3 //****************************************************************************
4 // Programmer: Duane M. Gran, ragnar@cs.bsu.edu
5 // Program: JhttpServer
6 // Date: April 24, 1998
7 //****************************************************************************
12 public class JhttpServer extends Thread{
14 private ServerSocket server;
15 private WebInterface webinterface;
17 //****************************************************************************
18 // Constructor: JhttpServer(int)
19 //****************************************************************************
20 public JhttpServer(int port, WebInterface webinterface)
22 System.out.println("starting...");
23 this.webinterface=webinterface;
25 System.out.println("creating the port");
26 server = new ServerSocket(port);
28 catch (IOException e){
29 System.err.println(e);
34 private void startWorker(Socket client) throws Exception {
35 (new JhttpWorker(client,false,webinterface)).start();
42 startWorker(server.accept());
45 System.err.println(e);