This commit is contained in:
laodaming 2023-08-24 12:24:24 +08:00
parent dca54ee2b7
commit 57c61e5921

View File

@ -47,8 +47,10 @@ var (
}
//升级websocket
upgrader = websocket.Upgrader{
//最大可读取大小 10M
ReadBufferSize: 1024 * 10,
//最大可读取大小 1M
ReadBufferSize: 1024,
//最大可写大小 1M
WriteBufferSize: 1024,
//握手超时时间15s
HandshakeTimeout: time.Second * 15,
//允许跨域
@ -58,7 +60,7 @@ var (
//写的缓存池
WriteBufferPool: &buffPool,
//是否支持压缩
EnableCompression: true,
EnableCompression: false,
}
//websocket连接存储
mapConnPool = sync.Map{}