/** KnockKnockConcurrentTCPServer.java * Auto-generated by Cliser, Mon Jun 19 14:06:55 EDT 2000, * except for the body of the method: * KnockKnockThread.interactWithClient(). * * See http://cs.calvin.edu/~cliser/ for more details. */ import cliser.ConcurrentTCPServer; import cliser.ServiceThread; class KnockKnockThread extends ServiceThread { public KnockKnockThread() { super(); } public void interactWithClient() { // replace these comments with statements that // define your server-thread's interaction with a client } } class KnockKnockConcurrentTCPServer extends ConcurrentTCPServer { public KnockKnockConcurrentTCPServer(int localPort) { super("KnockKnock", localPort, new KnockKnockThread()); } public static void main(String [] args) { KnockKnockConcurrentTCPServer myServer = null; if (args.length == 0) myServer = new KnockKnockConcurrentTCPServer(1234); else if (args.length == 1) myServer = new KnockKnockConcurrentTCPServer( Integer.parseInt(args[0]) ); else { System.err.println("\nUsage: java KnockKnockConcurrentTCPServer []\n"); System.exit(1); } myServer.run(); } }