Sample Client/Server Code from Unix Network Programming Vol 1, 2nd ed.
This should not be taken as an example of generally acceptable code
practice or documentation.  It is intended merely to illustrate the
the select call, which you may need for your assignment.

There are two programs, cli.C and svr.C, and a Makefile.  Compile using 
gmake.  The client program repeatly gets input from the user, 
and sends this input to server.  The server echos what it receives both 
to the screen and the client.  The client prints the echo to the screen.

When any one client types in "die", the server and this client will
terminate. All the other clients need to type "die" to commit suicide.
There is not much error checking.  Input must be less than 60 characters
long.

To use:

1. Start server  (e.g., on hostA), by typing in ./svr

The port number chosen will be printed, say 6098.

2. Start a number of clients on some other machines, 
(e.g., ./cli hostA 6098).

Now, you can type in anything at prompt ">".

3. To terminate, type in die.
