sendEval - executes a command on the server or on one or all clients

USAGE

    sendEval <command> [<client>]

DESCRIPTION

This is used to cause either the server or the clients to execute a command. This is a general form of communication between clients and the server.

If invoked on a client, the specified command will be executed on the server. If invoked on the server, the command will be executed on each client, unless a client number is specified in which case it will be executed only on that client. Client numbers can be found by using the clientInfo command.

sendEval does not wait for the remote command to finish executing and does not return anything. If you would like the server to request information from a client, the server should use sendEval to tell the client to use sendEval again to send the information back to the server.

EXAMPLES

If invoked in the server, this will cause all clients to run the script "buildNetwork.in":

    lens> sendEval {source buildNetwork.in}

If invoked in the server, this will cause every client to print their own process id:

    lens> sendEval {puts [pid]}

If invoked in the server, this will cause every client to print the server's process id:

    lens> sendEval "puts [pid]"

If invoked in a client, this will cause all clients, including the sender, to exit:

    lens> sendEval {sendEval exit}

SEE ALSO

sendObject, clientInfo, startServer, startClient


Last modified: Mon Jun 8.33:23:51 EDT 1998