srvrinit(port=2000,ncon=2)
srvrloop()
srvr(port=2000,ncon=2)
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
init