4P14

Lab 1
Sockets



In this lab you will be implementing a basic socket interface for communications of a network. Stalling has given a simple interface for the client and server (which we have gone over in class). Implement these in the lab environment, both as client and server. Lab machines will boot into Linux and windows. For this please use Linux, with an editor of your choice. Files can be compiled with gcc.

Students with laptops are encouraged to bring them to lab providing they have the requisite s/w installed. The lab provides drop cables to hard connect to the labs LAN. The LAN will DHCP the connection information. For those with no laptop, bring a USB stick to store your files.

1) Once the example files have been entered and compiled (See examples on Main Page), try to connect to another computer in the lab to initiate a response. The current implementation will do nothing more the echo back the input text.
2) Make modifications to the client and server to continue the conversation until the client enters "exit". Once done both the client and server will release.
3) Modify the server to continue to accept connections, i.e. It will handle consecutive connections (conversations with remote clients), until forcefully terminated on the host system.

Once complete, smile you have earned %4 of your final mark.