contents   index   previous   next



DSP.remote

syntax:

DSP.remote

description:

This global property of the DSP object is used to make calls back to the remote client from within a function. When the first DSP object in a script is created, this gets assigned to that value. From then on, whenever a packet needs to be serviced, this value is set (and later restored) to the object representing the incoming connection. This allows for multiple connections, and lets the function easily call back the appropriate client. Note that within a dspLoad call, the client does not wait for a response, and so trying to call on the client will yield no result until the server is queried again.

 

see:

#link <sedsp>

 

example:

// Assume the client calls this:

serverConn.printRemote("hi");

// And the server side looks like this:

function printRemote( string )

{

   DSP.remote.Screen.write( string );

}

// This will print out "hi" on the client machine