Tutorial week 3
- Write a TCP DayTime server. Try to get your client to work with
someone-else's server and vice versa
- Modify the sequential Echo server to timeout each client
after 10 seconds of inactivity.
Change the exception handling code for
handleSocket()
so that it can distinguish timeouts from other exceptions
- Modify the concurrent Echo server to log all messages sent
to it, recording the hostname and message. Hint: use a
PrintStream
object (which uses a File
object) which is shared by all threads,
and use this object to synchronise writes
- The time protocol (IETF RFC 868,
http://www.faqs.org/rfcs/rfc868.html) returns the elapsed time
as a 32-bit integer, which is the number of seconds since
1 January, 1900.
The specification gives the time as a signed integer. No implementation
has ever followed this specification as they all return an unsigned
integer.
-
If a signed integer was returned, what is the last date that
could be given?
-
Write a client to access this service.
This service should be running on port 37 of jan.newmarch.name
Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Fri Aug 1 21:19:20 EST 2003
Copyright ©Jan Newmarch