连接优化

This commit is contained in:
hahwu 2025-12-31 14:02:26 +08:00
parent 4b471ad95d
commit 0a53f88af7
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ func Init() {
server = new(network.TCPServer)
server.Addr = conf.Server.ListenAddr
server.MaxConnNum = int(math.MaxInt32)
server.PendingWriteNum = 1 << 20
server.PendingWriteNum = 1 << 14
server.LenMsgLen = 4
server.MaxMsgLen = 4096
server.NewAgent = newServerAgent

View File

@ -91,7 +91,7 @@ func connectRemote(RemoteAddr string, ConnType int, ConnLabel string) error {
client := new(network.TCPClient)
client.Addr = RemoteAddr
client.ConnNum = 1
client.PendingWriteNum = 1 << 20
client.PendingWriteNum = 1 << 14
client.LenMsgLen = 4
client.MaxMsgLen = 4096
client.NewAgent = newAgent