| | |
| | | // 为了更加清楚的说明一下上面的规则,调整一下例子中的代码。在写入通道前,在数据 |
| | | // pipeline.addLast(new LengthFieldBasedFrameDecoder(1024,3 ,4,0,13)); |
| | | |
| | | pipeline.addLast(new FixedLengthFrameDecoder(31)); // 测试用 固定长度消息 |
| | | pipeline.addLast(new FixedLengthFrameDecoder(10)); // 测试用 固定长度消息 |
| | | |
| | | //握手认证消息相应处理handler |
| | | pipeline.addLast(LoginAuthRespHandler.class.getSimpleName(), new LoginAuthRespHandler(imsClient)); |
| | | // pipeline.addLast(LoginAuthRespHandler.class.getSimpleName(), new LoginAuthRespHandler(imsClient)); |
| | | |
| | | //心跳消息响应处理handler |
| | | pipeline.addLast(HeartbeatRespHandler.class.getSimpleName(), new HeartbeatRespHandler(imsClient)); |
| | | // pipeline.addLast(HeartbeatRespHandler.class.getSimpleName(), new HeartbeatRespHandler(imsClient)); |
| | | |
| | | //接收消息处理handler |
| | | pipeline.addLast(TCPReadHandler.class.getSimpleName(),new TCPReadHandler(imsClient)); |