perf: control ws write buffer (#1451)

Signed-off-by: rfyiamcool <rfyiamcool@163.com>
This commit is contained in:
fengyun.rui
2023-11-22 17:31:37 +08:00
committed by GitHub
parent 7a13284b2e
commit a9153afc38
5 changed files with 23 additions and 4 deletions
+3 -1
View File
@@ -37,7 +37,9 @@ func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error {
WithPort(wsPort),
WithMaxConnNum(int64(config.Config.LongConnSvr.WebsocketMaxConnNum)),
WithHandshakeTimeout(time.Duration(config.Config.LongConnSvr.WebsocketTimeout)*time.Second),
WithMessageMaxMsgLength(config.Config.LongConnSvr.WebsocketMaxMsgLen))
WithMessageMaxMsgLength(config.Config.LongConnSvr.WebsocketMaxMsgLen),
WithWriteBufferSize(config.Config.LongConnSvr.WebsocketWriteBufferSize),
)
if err != nil {
return err
}