作者 crossoverJie

:bulb: Documenting source code.

@@ -17,7 +17,7 @@ public class HeartbeatInitializer extends ChannelInitializer<Channel> { @@ -17,7 +17,7 @@ public class HeartbeatInitializer extends ChannelInitializer<Channel> {
17 @Override 17 @Override
18 protected void initChannel(Channel ch) throws Exception { 18 protected void initChannel(Channel ch) throws Exception {
19 ch.pipeline() 19 ch.pipeline()
20 - //五秒没有收到消息 20 + //五秒没有收到消息 将IdleStateHandler 添加到 ChannelPipeline 中
21 .addLast(new IdleStateHandler(5, 0, 0)) 21 .addLast(new IdleStateHandler(5, 0, 0))
22 .addLast(new HeartbeatDecoder()) 22 .addLast(new HeartbeatDecoder())
23 .addLast(new HeartBeatSimpleHandle()); 23 .addLast(new HeartBeatSimpleHandle());