Learn R Programming

Rdsm (version 1.1.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 each client its ID and the total number of clients. Then srvrloop() is called to run the server.

Then, at each client, init() must be called.

One normally uses 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(); run srvr() just once on the server, and run init() just once at the clinets. Application-program Rdsm variables etc. will be retained from one run to the next.

See Also

init