Jaxer.Socket : Object
Return to: Jaxer Framework index

Network socket utility object for simple socket access.

Platform Support

Jaxer Server Framework Jaxer Client Framework
0.9 no

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.Socket Constructor() : Jaxer.Socket
The constructor of a network socket object
Show Details 0.9 no

Jaxer.Socket() : Jaxer.Socket

The constructor of a network socket object

Returns
Jaxer.Socket Returns an instance of Socket.

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
available() : String
Is the socket connection available?
Show Details 0.9 no

Returns
String true if available, false otherwise

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

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

readLine() : String
Read a single line from the socket
Show Details 0.9 no

Returns
String The text read in

readString(Number count) : String
Read characters from the socket into a string
Show Details 0.9 no

Parameters
Number count How many characters to read

Returns
String The text read in

writeString(String data) : void
Write a string to the socket
Show Details 0.9 no

Parameters
String data The text to write

aptana_docs