OS Options: Must run on CSEE shell servers
- Part 1 [50 points total]: Modify one of the echo client applications given in class.
The new echo client you create should read lines from a given file and
send each line to the echo server and then receive the echo back from the server in a loop until
end of file is reached. The application should print out how many bytes
were received from the server after every send and receive operation.
The application should take
the IP address and port to connect to from the command line as well as the filename.
The application should disconnect from the server and exit gracefully upon receiving an
end of file from standard input.
It should be able to understand both hostnames and IP addresses in dotted decimal notation.
- Part 2 [50 points total]: Modify one of the echo server applications given in class.
The new echo server should have a few additions:
- A [10 points]: This new echo server should conform to the RFC document for the
echo protocol given in class. This includes modifying the server to process each connection
until the client disconnects. In other words, the server should loop around the recv/send part until the
recv returns a value of 0 bytes received.
- B [5 points]: It should have the ability to take the port number to bind to
from the command line.
- C [15 points]: It should handle multiple connections concurrently. For C/C++, this means
adding usage of fork() and reaping all child processes or using POSIX threads. For Java, the use of the
Thread class will be necessary. Follow a process per connection or thread per connection model as
appropriate.
- D [20 points]: It should, optionally as a command line argument,
have the ability to change the data before sending back the echo
of the data. This change is to remove all whitespace (spaces, returns, newlines, etc.) in the text and
send back the changed text.
Notes:
Your submissions must at least compile before any credit will be given.
Submissions that do not compile will not be graded. Submissions submitted
after the due date will not be graded. All work must be your own original work.
To get partial credit for parts of the assignment, you must demonstrate that
those pieces work by themselves.
If you share code with others, you will be given a 0 for the assignment. This
assignment set is worth 16% of your total grade.
Todd L. Montgomery (revised 01.24.2007)