fix
This commit is contained in:
parent
687c18641f
commit
18bbc6788f
|
@ -44,14 +44,17 @@ var (
|
||||||
}
|
}
|
||||||
//升级websocket
|
//升级websocket
|
||||||
upgrade = websocket.Upgrader{
|
upgrade = websocket.Upgrader{
|
||||||
ReadBufferSize: 1024 * 10, //最大可读取大小 10M
|
//最大可读取大小 10M
|
||||||
|
ReadBufferSize: 1024 * 10,
|
||||||
//握手超时时间15s
|
//握手超时时间15s
|
||||||
HandshakeTimeout: time.Second * 15,
|
HandshakeTimeout: time.Second * 15,
|
||||||
//允许跨域
|
//允许跨域
|
||||||
CheckOrigin: func(r *http.Request) bool {
|
CheckOrigin: func(r *http.Request) bool {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
//写的缓存池
|
||||||
WriteBufferPool: &buffPool,
|
WriteBufferPool: &buffPool,
|
||||||
|
//是否支持压缩
|
||||||
EnableCompression: true,
|
EnableCompression: true,
|
||||||
}
|
}
|
||||||
//websocket连接存储
|
//websocket连接存储
|
||||||
|
|
Loading…
Reference in New Issue
Block a user