use of com.code.server.gate.encoding.GameCharsEncoder in project summer by foxsugar.
the class SocketServerInitializer method initChannel.
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
if (sslCtx != null) {
p.addLast(sslCtx.newHandler(ch.alloc()));
}
// p.addLast(new LoggingHandler(LogLevel.INFO));
p.addLast("encoder", new GameCharsEncoder());
p.addLast("decoder", new GameCharsDecoder());
p.addLast("timeout", new IdleStateHandler(15, 0, 0, TimeUnit.SECONDS));
// p.addLast(new SocketHandler());
p.addLast("gameHandler", new GameMsgHandler());
}
Aggregations