/** Wraps connecting events, from the network side to the application side */ @Override public void onConnect(ConnectionSession session) { connection.onConnect(session); }
void finishConnect() { Socket socket = socketChannel.socket(); InetSocketAddress local = (InetSocketAddress) socket.getLocalSocketAddress(); InetSocketAddress remote = (InetSocketAddress) socket.getRemoteSocketAddress(); connection.onConnect(new ConnectionSession(local, remote)); }