ssCore.UDP.recvMsg

Receives messages on the open socket, and send data to Flash using the event notification system.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

None.


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


Synchronous Mode:

This method can only be called asynchronously.


Notes:

In order to receive messages, you must first successfully call UDP.open, and set up an onReceive event notification (see UDP.setNotify).

UDP.recvMsg will only return if:

                

Examples:

ssCore.UDP.recvMsg({}, {callback:"receivingEnded", scope:this});

function receivingEnded(return_obj, callback_obj, error_obj)
{
    if (return_obj.success)
    {
        // The socket closed normally.
    }
    else
    {
        // The socket is unable to receive messages.
        ssDebug.trace("ERROR: "+error_obj.description);
    }
}