Titanium.Network.Socket

Submodule of Titanium.Network.
Platform Since
Android 1.7
iPhone 1.7
iPad 1.7

Summary

Socket module

Objects

Name Summary
Titanium.Network.Socket.TCP

TCP socket that implements the Titanium.IOStream interface. Created by Titanium.Network.Socket.createTCP

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

createTCP

returns new TCP socket object, takes object containing properties list defined in Titanium.Network.Socket.TCP. Some properties are only needed based on whether the socket will be a connecting socket or a listening socket.

fireEvent

Fires a synthesized event to any registered listeners.

removeEventListener

Removes the specified callback as an event listener for the named event.

Properties

Name Type Summary
CLOSED Number

state representing the closed state of a socket read-only

CONNECTED Number

state representing the connected state of a socket read-only

ERROR Number

state representing the error state of a socket read-only

INITIALIZED Number

state representing the initialized state of a socket read-only

LISTENING Number

state representing the listening state of a socket read-only

Events

This type has no events.