ssCore.UDP.sendMsgBinary

Send a message using the open socket to a specific IP name or address, using the port specified in UDP.open.


Availability:

First available in version 3.8 build 333.


Input Parameters:

destination - IP address or network name to send to.

data - Data, in hex string format, to send.


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.sendMsgBinary( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

This method can only be called asynchronously.


Notes:

The destination parameter can be an IP address or a name that can be resolved locally or by a DNS server.

For testing purposes, the destination can be the loopback address (127.0.0.1).

                

Examples:

ssCore.UDP.sendMsgBinary({destination:"192.168.123.34", data:"41424300616263"}, {callback:"messageSent", scope:this});

function messageSent(return_obj, callback_obj, error_obj)
{
    if (return_obj.success)
    {
        // Message was sent successfully.
    }
    else
    {
        ssDebug.trace("ERROR: "+error_obj.description);
    }
}