1 36 37 import java.io.*; 38 import java.nio.channels.*; 39 40 48 public class BN extends Server { 49 50 BN(int port, int backlog, boolean secure) throws Exception { 51 super(port, backlog, secure); 52 } 53 54 void runServer() throws IOException { 55 for (;;) { 56 57 SocketChannel sc = ssc.accept(); 58 59 ChannelIO cio = (sslContext != null ? 60 ChannelIOSecure.getInstance( 61 sc, true , sslContext) : 62 ChannelIO.getInstance( 63 sc, true )); 64 65 RequestServicer svc = new RequestServicer(cio); 66 Thread th = new Thread (svc); 67 th.start(); 68 } 69 } 70 } 71 | Popular Tags |