@Override
protected void initChannel(SocketChannel ch) throws Exception {
try {
ch.config().setOption(ChannelOption.IP_TOS, 0x18);
} catch (ChannelException ex) {
// IP_TOS not supported by platform, ignore
}
ch.config().setAllocator(PooledByteBufAllocator.DEFAULT);
ch.pipeline().addLast(new HttpServerCodec());
ch.pipeline().addLast(new HttpObjectAggregator(65536));
ch.pipeline().addLast(new WebSocketHandler());
ch.pipeline().addLast(new PacketDecoder());
ch.pipeline().addLast(new PacketEncoder());
ch.pipeline().addLast(new ClientHandler(server));
}
NetworkManager.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:Ogar2-Server
作者:
评论列表
文章目录