Titanium.Network.Socket.TCP WHERE POSSIBLE. The TCPSocket instance returned from
Titanium.Network.createTCPSocket. This object represents a socket which either listens locally on the device for connections, or connects to a remote machine.
Sockets are nontrivial; it is recommended that anyone using them be familiar with the basics of BSD sockets. All sockets use TCP connections, and are asynchronous for read operations, so your program should be ready to receive 'read' events at any point. Socket references cannot be transferred to socket objects, and vice-versa - socket references are an internal mechanism which is used only to determine which sockets to send data to and read data from. For listening sockets, it is highly recommended that you use the
Titanium.Network.INADDR_ANY constant as the host name. If a window containing a socket is closed, the socket MUST be closed also unless you intend to continue to receive data, otherwise the socket will consume resources (and potentially cause conflicts with opening the window again, if a listener) until the program is restarted. Be aware of the differences between the listen() and connect() functions; attempting to use one when you mean the other may result in errors, unpredictable behavior, or both.
Adds the specified callback as an event listener for the named event.
Deprecated close the socket
Deprecated connect the scocket to a TCP server
Fires a synthesized event to any registered listeners.
Gets the value of the hostName property.
Gets the value of the isValid property.
Gets the value of the mode property.
Gets the value of the port property.
Gets the value of the stripTerminator property.
Deprecated set up the socket to receive connections
Removes the specified callback as an event listener for the named event.
Sets the value of the hostName property.
Sets the value of the isValid property.
Sets the value of the mode property.
Sets the value of the port property.
Sets the value of the stripTerminator property.
Deprecated write data to the socket, if the mode is WRITE_MODE or READ_WRITE_MODE
Deprecated the host name to connect to. Must be
Deprecated whether or not the socket is valid
Deprecated the socket's mode
Deprecated the port to connect/listen on
Deprecated strip terminating null character when sending string data; default is false
Deprecated new data was read off the socket
Deprecated an error occured when reading
Deprecated an error occured when writing