mirror of
https://gitee.com/konyshe/goodlink.git
synced 2025-12-24 08:13:00 +08:00
增加缓冲区大小
This commit is contained in:
@@ -9,20 +9,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// defaultWndSize 如果设置为零,则使用默认的接收窗口缓冲区大小
|
||||
defaultWndSize = 64 * 1024
|
||||
|
||||
// maxConnAttempts 指定最大并发TCP连接尝试数
|
||||
maxConnAttempts = 2 << 12
|
||||
|
||||
// 优化的缓冲区大小配置
|
||||
minSendBufferSize = 64 * 1024
|
||||
maxSendBufferSize = 4 * 1024 * 1024
|
||||
defaultSendBufferSize = 512 * 1024 // 从256KB提升到512KB
|
||||
|
||||
minReceiveBufferSize = 64 * 1024
|
||||
maxReceiveBufferSize = 8 * 1024 * 1024
|
||||
defaultReceiveBufferSize = 1024 * 1024 // 从512KB提升到1MB
|
||||
defaultSendBufferSize = 10 * 1024 * 1024 // 从256KB提升到10MB
|
||||
defaultReceiveBufferSize = 10 * 1024 * 1024 // 从512KB提升到10MB
|
||||
|
||||
// tcpKeepaliveCount 在放弃并关闭连接之前发送的最大TCP保活探测次数
|
||||
tcpKeepaliveCount = 6
|
||||
|
||||
Reference in New Issue
Block a user