public void start() { java.net.ServerSocket server = new java.net.ServerSocket(this.port); // Create a receiver main loop... this.running = true; while (this.running) { // waiting for connect... java.net.Socket client = server.accept(); // create new thread for work java.lang.Thread worker = new java.lang.Thread(new SampleSimpleHttpServerWorker(client)); worker.start(); } }