Skip to content

Commit

Permalink
优化TCP相关参数
Browse files Browse the repository at this point in the history
  • Loading branch information
CC-Cheunggg committed May 1, 2020
1 parent eec9a1c commit e56395c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void start() {
.childOption(ChannelOption.SO_LINGER, 2)
.childOption(ChannelOption.SO_BACKLOG, 1024)
.childOption(ChannelOption.SO_TIMEOUT, 120 * 1000)
// [bandwidth] * [delay]
.childOption(ChannelOption.SO_SNDBUF, 128 * 5 * 120 * 1024)
.childOption(ChannelOption.SO_RCVBUF, 128 * 5 * 120 * 1024)
.childOption(ChannelOption.TCP_NODELAY, true);
Expand Down

0 comments on commit e56395c

Please sign in to comment.