V22.0480-002 Special Topics: Networks
Homework 4:      Create a networking application using the socket interface
to implement a "remote file viewer" service over UDP.
The protocol contains two parts:
   1. The client sends the name of the file to the server, and
      the server returns the size in bytes of the file.
   2. The client sends the name of the file, an integer offset into
      the file, and the number of bytes to return. The server opens
      the file, seeks to the requested offset, reads the requested
      number of bytes, and returns the bytes to the client. The client
      may not ask for more than 50 bytes at a time.
The client application takes a file name as command line arguments.
For example, you can invoke the client as follows:
        $ remcat acf5 file1
          This is the contents of file1.
Be sure to handle error conditions correctly! For example:
        $ remcat acf5 file2
          remcat: cannot access file2 on acf4.
And, as with all connectionless applications, make sure you handle
timeouts, retransmissions, and duplicate responses!
The address of your service should have a port number that corresponds
to the last 5 digits of your student ID.
What you must turn in:
1. A short description of your application-layer protocol.
2. A short description of your session layer-protocol.
3. A short description of your presentation-layer protocol.
4. The C code that implements the client-side of the application.
5. The C code that implements the server-side of the application.
Due date: Monday, March 27