

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Agrawala; Class: Computer Networks; Subject: Computer Science; University: University of Maryland; Term: Fall 2008;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Your server will run on a linuxlab machine 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 having super user (root) access.
Given that your class account login id is cs4170xx, the ports you should use are 10xx0-10xx9 (inclusive).
Thus, if your login id is cs417060, you will use port range 10600-10609. Your final project must work with any port, but when you are testing your project you should only use the ports you have been allocated to avoid collision with others. The rest of the protocol is as described in Project 0.
The command line syntax for a minimal server is given below. The server will take the port as argument. (you can almost re-use the argument parsing code in the client).
serverserverserverserver (^) [
•For project 1 the server only accepted null terminated strings. Your server should work even when the client sends the string without the terminal ‘\0’ character.
Error****Error****Error****Error fromfromfromfrom 128.8.126.133:48522128.8.126.133:48522128.8.126.133:48522128.8.126.133:
and immediately close the connection when it finds a bad message from the client. It should not breakdown, but continue operating after servicing misbehaving clients. Bad messages, as per project 0, are ones that have an incorrect magic string, incorrect message type or too many fields. Remember, the cookie sent in the STATUS message has to match the cookie in the CLIENT BYE message for a communication to be successful.
zipzipzipzip server.zipserver.zipserver.zipserver.zip server.cserver.cserver.cserver.c common.hcommon.hcommon.hcommon.h