CMPU-375: Networks
Vassar College, Fall 2007
Assignment 1: Simple email server and client
Due: Fri, Sep. 14, 2007
Description: Implement Exercise 2.2 (p. 41) from the text.
Starter code: EmailServer.java and EmailClient.java.
Logistics and other pertinent info:
- On your CS account on the Linux boxes, create and protect a cs375 course directory:
- cd
- mkdir cs375
- chmod 700 cs375
- Within your course directory, create a directory for this assignment:
- cd cs375
- mkdir assign1
- cd assign1
- Download the starter code (above) and save the files in your assign1 directory
- The server program is complete. Compile it from the command line:
- Add descriptive header comments to the EmailClient program.
- This should include, at a minimum, your name, the assignment number, date due, and a description of what the program does.
- It should also include an acknowledgement that you are modifying code written by the author, Jan Graba
- When your modifications to EmailClient.java are complete, and you're ready to test your client:
- run the server program on your assigned machine in the Asprey Lab.
(see our course home page for your individual machine assignments) - run the client program from any two machines in the Asprey Lab--one for user 'Dave' and the other for user 'Karen'.
- you can accomplish the above tasks via ssh from a single machine in the Asprey Lab.
Additional client code considerations:
- The
supplied code is intended to run on a single computer, that is, the
server and two clients would run on the same machine.
- In
addition to the edits described in exercise 2.2, be sure to change the
client code to get the internet address of the server by name. In other
words, change InetAddress.getLocalHost() to InetAddress.getByName(...)
-- and be sure to supply the name of the machine you're running your
server program on.
To hand in:
- A printout of your EmailClient.java source code
- An electronic copy of your EmailClient.java source code, via the submit375 script:
- cd
- cd cs375
- submit375 assign1