package test;

import java.net.*;
import java.io.*;
public class DateTimeServer {
		public final static int daytimePort = 5000;
		public static void main(String[] args) {
			ServerSocket theServer;
			Socket theConnection;
			try {
				theServer = new ServerSocket(daytimePort);
				while (true) {
					theConnection = theServer.accept();
					System.out.println("ServerSocket local port: " + theServer.getLocalPort());
					ConnectionHandler ch = new ConnectionHandler(theConnection);
					ch.start();
				}
			}catch (IOException e) {
				System.err.println(e);
			}
		}	
}

