mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
优化netty设置
This commit is contained in:
@@ -58,6 +58,7 @@ public class NettyServerManager implements CommandLineRunner {
|
||||
.childOption(ChannelOption.SO_SNDBUF, 64 * 1024) // 发送缓冲区
|
||||
.childOption(ChannelOption.WRITE_BUFFER_WATER_MARK, new WriteBufferWaterMark(32 * 1024, 64 * 1024)) // 写缓冲水位
|
||||
.childOption(ChannelOption.SO_REUSEADDR, true)
|
||||
.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) // 启用池化内存分配器
|
||||
.childHandler(nettyServerChannelInitializer)
|
||||
.localAddress(new InetSocketAddress(host, port));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user