Skip to content

Commit

Permalink
add netty length field length
Browse files Browse the repository at this point in the history
  • Loading branch information
nervose committed Aug 2, 2022
1 parent fb56a4f commit 7a0a13c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ protected void initChannel(SocketChannel ch) throws Exception {
new LoggingHandler(LogLevel.DEBUG),
new IdleStateHandler(0, nettyClientConfig.getChannelMaxIdleTimeSeconds(), 0),
new LengthFieldBasedFrameDecoder(nettyClientConfig.getFrameMaxLength(),
0, 2, 0,
2),
new LengthFieldPrepender(2),
0, 4, 0,
4),
new LengthFieldPrepender(4),
new NettyEncoder(serializer),
new NettyDecoder(serializer),
new HeartBeatReqHandler(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ protected void initChannel(SocketChannel ch) throws Exception {
eventExecutorGroup,
new LoggingHandler(LogLevel.DEBUG),
new LengthFieldBasedFrameDecoder(nettyServerConfig.getFrameMaxLength(),
0, 2, 0,
2),
new LengthFieldPrepender(2),
0, 4, 0,
4),
new LengthFieldPrepender(4),
new NettyDecoder(serializer),
new NettyEncoder(serializer),
new ReadTimeoutHandler(nettyServerConfig.getChannelIdleTimeoutSeconds()),
Expand Down

0 comments on commit 7a0a13c

Please sign in to comment.