|
|
@ -63,7 +63,7 @@ public class WebSocketServer implements IMServer { |
|
|
protected void initChannel(Channel ch) throws Exception { |
|
|
protected void initChannel(Channel ch) throws Exception { |
|
|
// 获取职责链
|
|
|
// 获取职责链
|
|
|
ChannelPipeline pipeline = ch.pipeline(); |
|
|
ChannelPipeline pipeline = ch.pipeline(); |
|
|
pipeline.addLast(new IdleStateHandler(30, 0, 0, TimeUnit.SECONDS)); |
|
|
pipeline.addLast(new IdleStateHandler(120, 0, 0, TimeUnit.SECONDS)); |
|
|
pipeline.addLast("http-codec", new HttpServerCodec()); |
|
|
pipeline.addLast("http-codec", new HttpServerCodec()); |
|
|
pipeline.addLast("aggregator", new HttpObjectAggregator(65535)); |
|
|
pipeline.addLast("aggregator", new HttpObjectAggregator(65535)); |
|
|
pipeline.addLast("http-chunked", new ChunkedWriteHandler()); |
|
|
pipeline.addLast("http-chunked", new ChunkedWriteHandler()); |
|
|
|