contents   index   previous   next



DSP dspLoad()

syntax:

dsp.dspLoad(code)

where:

code - String of code to load on the remote server

 

return:

void.

 

description:

This function loads the specified code into the global context on the remote server. Any code that you execute will remain on the remote server. This function is designed to load functions on the remote server so that they may be called by the client. This function does not wait for a return value from the host. As a consequence, remote errors will not be immediately reported. They will be reported next time a client routine (calling a function, getting/putting a value) queries the server. Note that if you wish to execute remote code and get a return value, the global eval() method for the server should be used, although the changes will not be permanent.

 

see:

#link <sedsp>

 

example:

function foo() { Screen.writeln("Hello!"); }

// This code will make "foo = new Function(...)"

// to set up the function on the remote server.

connection.dspLoad( "foo = " + ToSource(foo) );

connection.foo(); 

// foo is now a global function on the server

 


DSP dspService()