Class DateServer

java.lang.Object
edu.pdx.cs410J.net.DateServer

public class DateServer extends Object
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

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static class 
    A worker thread that waits five seconds before returning the current date.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Listens for 5 clients to attach.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args)
      Listens for 5 clients to attach. The client's request is handled in its own DateServer.Worker thread.