Code example for ServerSocketChannel

Methods: registersocketconfigureBlocking

0
    public NIOAcceptor(String name, int port, FrontendConnectionFactory factory) throws IOException {
        super.setName(name);
        this.port = port;
        this.selector = Selector.open();
        this.serverChannel = ServerSocketChannel.open();
        this.serverChannel.socket().bind(new InetSocketAddress(port));
        this.serverChannel.configureBlocking(false);
        this.serverChannel.register(selector, SelectionKey.OP_ACCEPT);
        this.factory = factory;
    } 
     
    @Override 
    public void run() { 
    	 
    } 
     
    /** 
     * ½ÓÊÕ´¦ÀíÇ°¶ËÊý¾Ý 
     */ 
    private void accept() { 
Connect your IDE to all the code out there  Get Codota for Java