ssCore.TCP.sendMsg

Send a message using the open socket.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

data - Data (message) to send to the destination machine.

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


Synchronous Mode:

This method can only be called asynchronously.


Notes:

None.

                

Examples:

ssCore.TCP.sendMsg({data:"Hello"}, {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);
    }
}