Jaxer.BinarySocket : Object
Return to: Jaxer Framework index

Network socket utility object for simple binary socket access.

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Constructors

ConstructorActionJaxer Server FrameworkJaxer Client Framework
Jaxer.BinarySocket Constructor() : Jaxer.BinarySocket
The constructor of a network socket object used for binary data operations
Show Details1.0no

Jaxer.BinarySocket() : Jaxer.BinarySocket

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

Returns
Jaxer.BinarySocketReturns an instance of BinarySocket.

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
available() : Number
How many bytes are currently available on the stream?
Show Details1.0no

Returns
Numberthe number of bytes available

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

Parameters
StringhostThe host to connect to
NumberportThe port on which to connect

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

Parameters
NumbercountHow many bytes to read

Returns
ArrayThe bytes read in, as an array of integers

readByteString(Number count) : String
Read binary data from the socket into a string
Show Details1.0no

Parameters
NumbercountHow many bytes to read

Returns
StringThe bytes read in, as a string

writeByteArray(Array data) : void
Write a binary (byte) data array of integers to the socket
Show Details1.0no

Parameters
ArraydataThe binary data array to write

writeByteString(Array data) : void
Write a binary (byte) data string to the socket
Show Details1.0no

Parameters
ArraydataThe binary data string to write

aptana_docs