# Titanium.Network.Socket

Socket module, used for creating sockets.

Availability
1.7
1.7
9.2.0

# Methods

# createTCP

Availability
1.7
1.7
9.2.0
createTCP([params]) Titanium.Network.Socket.TCP

Returns a new TCP socket object.

Takes a dictionary containing properties defined in Titanium.Network.Socket.TCP.
Some properties are only needed based on whether the socket will be a connecting (client) socket or a listening (server) socket.

Parameters

Name Type Description
params Dictionary<Titanium.Network.Socket.TCP>

Creation parameters.

Returns

New TCP socket.

# Constants

# CLOSED

Availability
1.7
1.7
9.2.0
CLOSED :Number

State value representing a closed socket.


# CONNECTED

Availability
1.7
1.7
9.2.0
CONNECTED :Number

State value representing a connected socket.


# ERROR

Availability
1.7
1.7
9.2.0
ERROR :Number

State value indicating an error has occurred on the socket.


# INITIALIZED

Availability
1.7
1.7
9.2.0
INITIALIZED :Number

State value representing an initialized socket.

The initial state of a newly-created socket.


# LISTENING

Availability
1.7
1.7
9.2.0
LISTENING :Number

State value representing a socket that is listening for connections.