120121122123124125126127128129130
actual.append("A"); } }); acceptor.bind(new VmPipeAddress(1)); connector.setHandler(new IoHandlerAdapter() { @Override public void sessionOpened(IoSession session) throws Exception { session.write("B");
6263646566676869707172
} else { fail("unexpected message received " + message); } } }); acceptor.bind(address); connector.setHandler(new IoHandlerAdapter() { @Override public void messageReceived(IoSession session, Object message) throws Exception { //System.out.println(Thread.currentThread().getName() + ": " + message);
8586878889909192939495
success[0] = true; session.close(true); } } }); acceptor.bind(new InetSocketAddress(port)); IoConnector connector = createConnector(); connector.setHandler(new IoHandlerAdapter() { @Override public void exceptionCaught(IoSession session, Throwable cause)
123124125126127128129130131132133
// No Nagle's algorithm ((NioSocketAcceptor)acceptor).getSessionConfig().setTcpNoDelay( true ); } // Start the listener acceptor.bind(); } } LOG.info( "DNS service started." ); System.out.println( "DNS service started." );
506507508509510511512513514515516
// Inject the protocol handler acceptor.setHandler( new KerberosProtocolHandler( this, store ) ); // Bind to the configured address acceptor.bind(); } } LOG.info( "Kerberos service started." ); System.out.println( "Kerberos service started." );
316317318319320321322323324325326
// Set the handler acceptor.setHandler( new ChangePasswordProtocolHandler( this, store ) ); // Bind acceptor.bind(); } } LOG.info( "ChangePassword service started." ); System.out.println( "ChangePassword service started." );
136137138139140141142143144145146
// Inject the chain acceptor.setFilterChainBuilder( ntpChain ); // Start the listener acceptor.bind(); } } LOG.info( "NTP server started." ); System.out.println( "NTP server started." );
134135136137138139140141142143144
// Inject the chain acceptor.setFilterChainBuilder( ntpChain ); // Start the listener acceptor.bind(); } } LOG.info( "NTP server started." ); }
122123124125126127128129130131132