1 36 37 import java.nio.channels.*; 38 39 48 public class N1 extends Server { 49 50 N1(int port, int backlog, boolean secure) throws Exception { 51 super(port, backlog, secure); 52 ssc.configureBlocking(false); 53 } 54 55 void runServer() throws Exception { 56 Dispatcher d = new Dispatcher1(); 57 d.register(ssc, SelectionKey.OP_ACCEPT, 58 new AcceptHandler(ssc, d, sslContext)); 59 d.run(); 60 } 61 } 62 | Popular Tags |