@Override public void sessionClosed(IoSession session) throws Exception { engine.pushTask(new SessionClosedTask(session)); }
@Override public void sessionOpened(IoSession session) throws Exception { session.setAttribute("remote", session.getRemoteAddress()); session.getFilterChain().addFirst("protocol", new ProtocolCodecFilter(RS2CodecFactory.LOGIN)); engine.pushTask(new SessionOpenedTask(session)); }
@Override public void messageReceived(IoSession session, Object message) throws Exception { engine.pushTask(new SessionMessageTask(session, (Packet) message)); }