---------------------------------------------------------------------------- ---------------------------------------------------------------------------- README.txt this file echo/ example program illustrating TCP/IP socket programming. You may find the multitasking server TCPEchoServer-Fork.c especially helpful. pong/ last semester's multitasking server project. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ** WATCH out for x-tra WHITE spaces in the Makefile. The compile line needs to be proceeded by a <TAB> (only). The compile line is the line below the target line. Project 1 Helper FILES: ----------------------- Steps (running on atlas.cs.uga.edu): 1. figure out IP number for server 2. download and make/compile the programs see web page for pointers 3. run server (if not using default port) in one xterm/window 4. run client in another xterm/window 5. run client with the system provided server Note: if you are running code on Linux you need to modify the make file. i.e. comment LIB line for Solaris, un-comment LIB line for Linux. Step 1: figure out IP number for server ------- atlas: IP Address: 128.192.251.3 FYI: You can uses the unix utility: nslookup to do this i.e.: {apollo:maria:317} nslookup atlas.cs.uga.edu Server: dns1.uga.edu Address: 128.192.1.9 Name: atlas.cs.uga.edu Address: 128.192.251.3 Step 2.1: copy/download code to YOUR homedirectory ------ Step 2.2: run make (make clean and make) ------ {atlas::229} make clean rm -f TCPEchoClient TCPEchoServer-Fork TCPEchoServer *.o {atlas::230} make gcc -o TCPEchoClient TCPEchoClient.c DieWithError.c -lsocket -lnsl gcc -o TCPEchoServer TCPEchoServer.c \ DieWithError.c \ HandleTCPClient.c \ -lsocket -lnsl gcc -o TCPEchoServer-Fork TCPEchoServer-Fork.c \ DieWithError.c \ HandleTCPClient.c \ AcceptTCPConnection.c \ CreateTCPServerSocket.c \ -lsocket -lnsl Step 3: run server ------- {atlas:maria:423} TCPEchoServer 5000 Step 4: run client ------ {atlas:maria:517} TCPEchoClient 128.192.251.5 "The OS class is great" 5000 Example Sessions: ---------------- Server: {atlas::494} TCPEchoServer 5000 Handling client 128.192.251.5 Client: {atlas::517} TCPEchoClient 128.192.251.5 "The OS class is great" 5000 Received: The OS class is great run client with the system provided server (i.e. use port 7): TCPEchoClient 128.192.251.5 "The OS class is great" 7