Ti.UDP

Description

Marshals UDP traffic.

Properties

int bufferSize

Specifies how large of a packet that can be received. Defaults to 256.

Methods

void start(dictionary args)

Starts the socket. Takes a dictionary with the following values:

void sendString(dictionary args)

Sends a string of data over UDP. Takes a dictionary with the following values:

void sendBytes(dictionary args)

Sends bytes over UDP. Takes a dictionary with the following values:

void stop()

Stops listening for and sending network traffic.

Events

started

Fired when the socket has finished initializing and it is ready to be used.

data

Fired when data is received. A dictionary is provided with the following values:

error

Fired when an error is encountered. A dictionary is provided with the following values: