Jaxer.BinarySocket : Object
Return to: Jaxer Framework index

Network socket utility object for simple binary socket access.

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 no

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.BinarySocket Constructor() : Jaxer.BinarySocket
The constructor of a network socket object used for binary data operations
Show Details 1.0 no

Jaxer.BinarySocket() : Jaxer.BinarySocket

The constructor of a network socket object used for binary data operations

Returns
Jaxer.BinarySocket Returns an instance of BinarySocket.

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
available() : Number
How many bytes are currently available on the stream?
Show Details 1.0 no

Returns
Number the number of bytes available

close() : void
Close the socket
No Details 1.0 no
flush() : void
Flush the socket's output stream
No Details 1.0 no
open(String host, Number port) : void
Open the socket for communication
Show Details 1.0 no

Parameters
String host The host to connect to
Number port The port on which to connect

readByteArray(Number count) : Array
Read binary data from the socket into an array of bytes (integers)
Show Details 1.0 no

Parameters
Number count How many bytes to read

Returns
Array The bytes read in, as an array of integers

readByteString(Number count) : String
Read binary data from the socket into a string
Show Details 1.0 no

Parameters
Number count How many bytes to read

Returns
String The bytes read in, as a string

writeByteArray(Array data) : void
Write a binary (byte) data array of integers to the socket
Show Details 1.0 no

Parameters
Array data The binary data array to write

writeByteString(Array data) : void
Write a binary (byte) data string to the socket
Show Details 1.0 no

Parameters
Array data The binary data string to write

aptana_docs