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) {
21 System.out.println("starting...");
22 this.webinterface=webinterface;
24 System.out.println("creating the port");
25 server = new ServerSocket(port);
27 catch (IOException e){
28 System.err.println(e);
33 private void startWorker(Socket client) throws Exception {
34 (new JhttpWorker(client,false,webinterface)).start();
41 startWorker(server.accept());
44 System.err.println(e);