Code example for ServerSocketChannel

Methods: accept

0
 
    class Acceptor implements Runnable {
        @Override 
        public void run() { 
            try { 
                SocketChannel accept = serverSocketChannel.accept();
                if (null != accept) {
                    //                new Handler(selector,accept); 
                } 
            } catch (IOException e) {
                e.printStackTrace();
            } 
        } 
    } 
}