Project 2 - CMSC 417, Spring 2000
Due: Wednesday February 16, 2000 (before midnight)
In this assignment you will write the server program which will
communicate using sockets with the client program in Project 1
(i.e., the previous assignment).
Your server will run on the AITS machines and will listen on a TCP
socket bound to a port as described below. Note that you cannot bind to a
port below 1024 without being superuser.
Ports are a shared resource, so we need to partition the port space.
Given that your class account login id is lg417XY, the ports you
can use are 10XYN where N can be 0 to 9. This gives each person 10
ports on each machine. Your project must work with any port,
but when you are testing your
project you should only use the ports you have been allocated.
The rest of the protocol will be the same as before. The version
string to use, for all messages, is PROJ2.
The Server Program
The command line syntax for a minimal server is given below. The sever
will take the host name and port as arguments (you can re-use the
argument parsing code in the client).
server [-h <hostname>:[<port>]]
The server should output the cookies it generates and the names,
addresses for which it generates cookies. It can either output this
on the screen or you can log this to a file. Note that, your server
should not accept spurious input from the clients. We will test your
server with non-conforming clients; the server should immediately
close the connection when it finds a bad message from the
Be sure to check the
Project Notes and the
listed on the class Web page for other requirements.
We will provide the source code for a conforming client for
those who did not get the client to work in the first week. Due to
the late turnin policy, this code will be made
available after Friday night.
Remember that you
will be building on these programs for subsequent stages of the
term project, so it is in your own best interest to make them
Have fun and good luck!