Project 2: 22C:178 & 055:134

Computer Communications Fall 1998

Project 5 [due 11 December]

The project is a client-server project in which the client can ``recover'' from a simulated server crash. In real applications, clients may be able to switch to using a secondary server if the primary server is not responding. For this project, we only use one server, but the problem is that it stops answering on its TCP port. When this happens, your client program switches to another TCP port and continues.

The server program uses the following simple logic:

You can view the code for the server: pr5serv.c and study how it communicates with the client. Also, when you are testing, it may be useful to examine the log file and the table that the server reads and writes. (You will need to have your browser reload these each time you want to see the latest results.) Each line in the table shows a student ID number and the number of times number calculations were correctly verified in connection A and connection B.

What to Turn In

Submit your program source by email so that we can compile it, test it, and verify that it works correctly. Mail the program to and specify in the subject line, the course number, the project number and the last four digits of your student ID number (we are hoping that four digits will be unique). So, for example if your student number is 123456789, then the subject line of your email should be:

178 project 5, student 6789
If you do not have such a subject line, I will bounce the mail back to you for resubmission.


This project counts 150 points maximum. The grading will be figured from two items, the source you submit and the server log (from our testing and perhaps your earliere testing). We can see if your program ran (or at least that some program correctly ran) from the server log. The server log and table may also be valuable for us to monitor your progress in completing the assignment.

Note: It is possible that the server can crash, either because it has a bug or because of some hardware problem. If you are in doubt about whether the server is properly running you can test it using the sample client program pr5cli which tests the server using student number 9999 (sorry, this program only runs on departmental HP machines).