1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-09 17:30:44 +00:00

reduce buffer size in websocket

This commit is contained in:
Darien Raymond 2017-11-16 18:11:02 +01:00
parent c4be61e854
commit 51ddc00c70
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ func dialWebsocket(ctx context.Context, dest net.Destination) (net.Conn, error)
NetDial: func(network, addr string) (net.Conn, error) {
return internet.DialSystem(ctx, src, dest)
},
ReadBufferSize: 32 * 1024,
WriteBufferSize: 32 * 1024,
ReadBufferSize: 8 * 1024,
WriteBufferSize: 8 * 1024,
HandshakeTimeout: time.Second * 8,
}

View File

@ -22,8 +22,8 @@ type requestHandler struct {
}
var upgrader = &websocket.Upgrader{
ReadBufferSize: 32 * 1024,
WriteBufferSize: 32 * 1024,
ReadBufferSize: 8 * 1024,
WriteBufferSize: 8 * 1024,
HandshakeTimeout: time.Second * 8,
}