mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 16:07:16 -05:00
reduce websocket memory usage
This commit is contained in:
parent
0959755d21
commit
80e43a6b37
@ -35,8 +35,8 @@ func dialWebsocket(ctx context.Context, dest net.Destination) (net.Conn, error)
|
|||||||
NetDial: func(network, addr string) (net.Conn, error) {
|
NetDial: func(network, addr string) (net.Conn, error) {
|
||||||
return internet.DialSystem(ctx, src, dest)
|
return internet.DialSystem(ctx, src, dest)
|
||||||
},
|
},
|
||||||
ReadBufferSize: 8 * 1024,
|
ReadBufferSize: 4 * 1024,
|
||||||
WriteBufferSize: 8 * 1024,
|
WriteBufferSize: 4 * 1024,
|
||||||
HandshakeTimeout: time.Second * 8,
|
HandshakeTimeout: time.Second * 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ type requestHandler struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var upgrader = &websocket.Upgrader{
|
var upgrader = &websocket.Upgrader{
|
||||||
ReadBufferSize: 8 * 1024,
|
ReadBufferSize: 4 * 1024,
|
||||||
WriteBufferSize: 8 * 1024,
|
WriteBufferSize: 4 * 1024,
|
||||||
HandshakeTimeout: time.Second * 8,
|
HandshakeTimeout: time.Second * 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user