Package edu.pdx.cs410J.net
Class DateServer
java.lang.Object
edu.pdx.cs410J.net.DateServer
A server that waits for a
DateClient
to connect to it.
When a client connects, it waits for 5 seconds before returning the
current date and time. This program demonstrates the ports that
are actually used when a socket connection is made. The server
will exit after five clients have connected to it.- Since:
- Fall 2005
- Author:
- David Whitlock
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
A worker thread that waits five seconds before returning the current date. -
Constructor Summary
-
Method Summary
-
Constructor Details
-
DateServer
public DateServer()
-
-
Method Details
-
main
Listens for 5 clients to attach. The client's request is handled in its ownDateServer.Worker
thread.
-