ssCore.UDP.open

Opens a socket on the selected port, and prepares it for sending and receiving messages.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

port - Port to open.

localAddress - [Optional] - Associate the socket with a specific local IP address. If not specified, then the system will pick an IP address for you. You really only need to worry about this parameter if you have a multihomed system or you have multiple IP addresses assigned to a single network interface.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.UDP.open( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.UDP.open( paramsObject );


Notes:

None.

                

Examples:

// listen on the default IP address (the ssystem will decide for you)
ssCore.UDP.open({port:5550});

// only listen for packets at 10.0.0.99 (useful on a multi-homed system)>
ssCore.UDP.open({port:5550, localAddress:"10.0.0.99"});