代码调整

This commit is contained in:
2025-01-08 15:16:14 +08:00
parent ce3eb8f916
commit 84fdd18f4e

View File

@@ -45,7 +45,7 @@ public class NettyClient {
//空闲状态的handler
// 添加LineBasedFrameDecoder来按行分割数据
.addLast(new LineBasedFrameDecoder(10240))
.addLast(new IdleStateHandler(20, 0, 0, TimeUnit.SECONDS))
.addLast(new IdleStateHandler(10, 0, 0, TimeUnit.SECONDS))
.addLast(new StringDecoder(CharsetUtil.UTF_8))
.addLast(new StringEncoder(CharsetUtil.UTF_8))
.addLast(handler);