This is an old revision of the document!


Instructions for the programming part in HW2

What to submit: You will handle two .java files and one .txt file :

  1. WebServer.java
  2. HttpRequest.java
  3. README.txt

Please follow these conventions, for ease of testing:

  • Use the port = 6789 for the WebServer.
  • Use localhost address.

Hints

  • Use the Java code provided as a starting point in the assignment.
  • For the WebServer, you can get the tcp server from the discussion examples and then change the part of the code where the Server replies to the client (it is after the connection establishment).
  • The HttpRequest must implement the Runnable interface or extend the Thread class. You must be able to run a new thread for each connection request.
  • In the README.txt file, you should write a short description of your code and indicate how to run/test yourserver.