ssCore.UDP.broadcastMsg

Broadcasts the specified data (message) to all machines on the attached network, using the port specified in UDP.open.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

data - Contents of the message to broadcast on the network.

addNull - [Optional] - Add a terminating (NULL) character to the end of the supplied data string. Valid values include: true,false. Default value is false.


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.broadcastMsg( 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.broadcastMsg( paramsObject );


Notes:

UDP.open must be successfully called before calling UDP.broadcastMsg.

There is no hard-coded limit to the amount of data that can be sent, though it must be noted that there is a limit to the amount of data that UDP.recvMsg can accept. This limit can vary from machine to machine, but is generally around 64K bytes.

                

Examples:

ssCore.UDP.broadcastMsg({data:"Hello"});