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);
26 } catch (IOException e) {
27 System.err.println(e);
32 private void startWorker(Socket client) throws Exception {
33 (new JhttpWorker(client,false,webinterface)).start();
40 startWorker(server.accept());
41 } catch (Exception e) {
42 System.err.println(e);