Jaxer.BinarySocket

Network socket object used for binary data operations.

Constructor

var socket = new Jaxer.BinarySocket();

Properties

Unknown or not documented yet

Methods

  • Jaxer.BinarySocket.prototype.available();
  • none

    number

    Return the number of bytes available in the stream.

  • Jaxer.BinarySocket.prototype.close();
  • none

    null

    Closes the socket.

  • Jaxer.BinarySocket.prototype.flush();
  • none

    null

    Flush the socket's output stream.

  • Jaxer.BinarySocket.prototype.open(host, port);
    • <String>host - The host to connect to
    • <Number>port - The port on which to connect

    null

    Open the socket for communication.

  • Jaxer.BinarySocket.prototype.readByteArray(count);
    • <Number>count - How many bytes to read.

    The bytes read in as an array of integers.

    Read binary data from the socket into an array of bytes.

  • Jaxer.BinarySocket.prototype.readByteString(count);
    • <Number>count - How many bytes to read.

    The bytes read in as a string.

    Read binary data from the socket into a string.

  • Jaxer.BinarySocket.prototype.writeByteArray(data);
    • <Number[]>data - The binary data to write.

    null

    Write a binary (byte) data array of integers to the socket.

  • Jaxer.BinarySocket.prototype.readByteString(data);
    • <Number[]>data - The binary data string to write

    null

    Write a binary (byte) data string to the socket.