Skip to content

Commit

Permalink
Merge pull request #386 from nervose/master-2.x-local-dev
Browse files Browse the repository at this point in the history
add netty length field length
  • Loading branch information
changmingxie authored Aug 2, 2022
2 parents fb56a4f + 7a0a13c commit 585c636
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 585c636

Please sign in to comment.