public static void main(String args[]){ if (args.length!=1) throw new IllegalArgumentException("unlawful number of args:USER: Console "); new Console(Integer.parseInt(args[0])); }
public Console(int port){ this.port = port; try { ServerSocket socket = new ServerSocket(port); System.out.PRintln("Start service on "+port); while(true){ new Transmit(socket.accept()).start(); } }catch (IOException e){} }