Spring 2015 CSCI 373 Homework 5 Problems
Times
- Posted — 19 February
- First email — 1 March
- First submission — 7 March
- Second email — 11 March
- First question 16 March
- Second submission — 17 March
- Due date — 18 March
Submitted solutions
- Submitted — 17
- Working with the possible exception of port number handling — 4
- Not handling concurrent connections properly — 1
- Connecting but not following protocol (generally producing
responses that are not given in the protocol specification)
— 2
- Other problems
- Bad python syntax
- Using
sys.argc
as a string, not an array
- Ignoring
sys.argc
port number argument
- Binding to IP 120.0.0.1
- Unneeded
gethostname
- Not using
int
on port argument
- Trying to read anything from the standard input stream
Other stuff
A large number of the questions I received variations were
“Do have have an example of a program that I can modify for the
assignemnt?”
Testing is important.
It can be tested using nc.
I did not see any functions to process the input line.
I did see many an elif
in the main loop.
Write a command processing function and test it early!
Make your code “bullet proof.” This was hard for the first classes
I taught, but now we have exceptions!
- The port argument may not be given.
- The port argument may not be a number.
- The port argument may be out-of-range.
- The port argument may already be in use.
Your program should check for all of these conditions.
The plan
What is submitted so far will be 50% of the 50 points.
There will be a Homework 5bis to improve the overall grade.
Start working on it.