Learn R Programming

Rdsm (version 1.0.0)

srvr: srvrinit

Description

Server-side code. Invocation of the Rdsm server.

Usage

srvrinit(port=2000,ncon=2) 
srvrloop() 
srvr(port=2000,ncon=2)

Arguments

port
Server TCP port number
ncon
Number of connections, i.e. number of clients.

Details

The function srvrinit accepts client requests for connection with the server, and returns to the the client its ID and the total number of clients. Then srvrloop is called to run the server.

Then, at each client, init is called, then the application function.

One may use srvr in lieu of the pair srvrinit and srvrloop.

You may have several application functions to run, or may want to run the same one multiple times. This is fine as long as you don't rerun srvrinit(); you must rerun srvrloop, but do not rerun init at the clinets. Application-program Rdsm variables etc. will be retained from one run to the next.

See Also

init