cp /tmp/echolab.tar ~/csc1600
cd ~/csc1600 tar xvf echolab.tarThis will cause a number of files to be unpacked in your directory echolab:
|echoserver.c||C code for a sequential echo server|
|echoclient.c||C code for an echo client|
|nethelp.c||File containing helper functions|
|nethelp.h||Header file for functions defined in nethelp.c|
|Makefile||Compiles and links together nethelp.c and a source file|
./echoserver NOpen a separate window on tanner to test the server with telnet first:
telnet tanner Nand with the echo client second:
./echoclient tanner NNow anything you type into the client window will be sent over the connection and echoed back to you by the server.
To test your multithreaded server, open two client windows and have the clients talk simultaneously to the server.
For all exercises below, work with the multithreaded version of your server.
123 server received 4 bytes 321
123 4567 server received 9 bytes 1234567