This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 public class WebServerExample {
2
3     public static int main(String arg[]) {
4         // Create New ServerSocket
5         //      System.printString("W> Starting\n");
6         ServerSocket ss = new ServerSocket(9000);
7         //      System.printString("W> Creating ServerSocket\n");
8         Logger log = new Logger();
9         Inventory inventorylist = new Inventory();
10         acceptConnection(ss, log, inventorylist);
11     }
12
13     //Listen for a request and accept request 
14     public static void acceptConnection(ServerSocket ss, Logger log, Inventory inventorylist) {
15         //      System.printString("W> Waiting for connection...\n");
16         while(true) {
17             Socket s=ss.accept();
18             WebServerThread web = new WebServerThread(s, log, inventorylist);
19             web.start();
20             //  System.printString("W> Connected... \n");
21         }
22     }
23 }