System.out.println("DarwinSys JavaWeb Server 0.1 starting...");
HttpdConcurrent w = new HttpdConcurrent();
if (argv.length == 2 && argv[0].equals("-p")) {
w.startServer(Integer.parseInt(argv[1]));
} else {
w.startServer(HTTP);
}
w.runServer();
public void
runServer()
while (true) {
final Socket clientSocket = sock.accept();
myThreadPool.execute(new Runnable() {
public void run() {
new Handler(HttpdConcurrent.this).process(clientSocket);
}
});
}