Homework 6

Due date and weights

This is a 100-point assignment due by 11:00 pm on Thursday 14 April, 2011. You should submit your program (Python suggested) to Homework 6 of the course moodle.

Back after 7 years

Every once in a while, it's worth making sure you're keeping up with the old standards. This means we are going to complete an assignment similar to one done 7½ years ago, in particular, CSCI 363 Project 3 of the Fall 2003 semester.

The task

This time you're going to write a server. You server should be able to run under the Linux operating system and should be submitted by moodle. Your server should be written so that it can be started by executing the following command:

In this command port is the TCP port which your server will open and accept connections.

The server

After your server accepts a remote connection, it will reply with the following message, which must be terminated by the standard \r\n:

The client should respond with a number within the specified range. Your server should reply with one of the following messages.

In the first two cases the server will continue to accept new guesses. In the last two cases the server closes the connection. In the third case the NN is the number of times required to successfully guess the number. The very last case is for those instances in which the client provides improper input.

Grading

Server programs are expected to be well-written and well-documented. They are also expected to be robust. In order to receive more the 85% credit for this assignment, your server must also be able to process concurrent client connections!

Turning in the assignment

You may write your program in any programming language that runs on the UNCA CSCI Linux workstations. Submit your assignment as Homework 6 on the course moodle page.