Rev 222 | Rev 224 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*******************************************************************************
* File: P3_Server.java
* Author: Ira W. Snyder (devel@irasnyder.com)
* License: GNU General Public License v2
* Class: CS380 - Computer Networking
*
* Assignment: Project #3
* Date Last Modified: 2006-02-15
*
* Purpose: //FIXME
******************************************************************************/
import java.net.*;
import java.io.*;
public class P3_Server
{
private static final int portNumber = 1337;
public static void main (String[] args) throws IOException
{
ServerSocket socket = null;
DHCPTable table = new DHCPTable ();
boolean listening = true;
try
{
socket = new ServerSocket (portNumber);
}
catch (IOException e)
{
System.err.println ("Could not listen on port: " + portNumber);
System.exit (1);
}
System.out.println ("Listening for connections on port: " + portNumber);
while (listening)
{
new P3_ServerThread (socket.accept(), table).start();
}
socket.close();
}
}