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