import java.net.*; import java.io.* ; class LineParent{ public static void main (String args[]) { InetAddress RemoteHostIP ; ServerSocket Rendezvous ; int port = 3630 ; SynchCount count = new SynchCount ( 0 ) ; try { Rendezvous = new ServerSocket( port ) ; } catch ( IOException ioe ) { System.out.println("Cannot create port at " + Integer.toString(port)); System.out.println( ioe.toString() ) ; return ; } while (true) { Socket RemoteHostConnect ; Thread nextWorker ; try { RemoteHostConnect = Rendezvous.accept() ; } catch ( IOException ioe ) { System.out.println("Failure on excepting a new connection") ; System.out.println( ioe.toString() ) ; return ; } nextWorker = new LineChild ( RemoteHostConnect, count, System.out ) ; nextWorker.start() ; } } }