mirror of https://github.com/v2ray/v2ray-core
reduce websocket buffer size
parent
0cf5087852
commit
55fb18b6e1
|
@ -56,8 +56,8 @@ func wsDial(ctx context.Context, dest v2net.Destination) (*wsconn, error) {
|
|||
|
||||
dialer := websocket.Dialer{
|
||||
NetDial: commonDial,
|
||||
ReadBufferSize: 65536,
|
||||
WriteBufferSize: 65536,
|
||||
ReadBufferSize: 32 * 1024,
|
||||
WriteBufferSize: 32 * 1024,
|
||||
}
|
||||
|
||||
protocol := "ws"
|
||||
|
|
|
@ -134,8 +134,8 @@ func (wsl *WSListener) listenws(address v2net.Address, port v2net.Port) error {
|
|||
|
||||
func (wsl *WSListener) converttovws(w http.ResponseWriter, r *http.Request) (*wsconn, error) {
|
||||
var upgrader = websocket.Upgrader{
|
||||
ReadBufferSize: 65536,
|
||||
WriteBufferSize: 65536,
|
||||
ReadBufferSize: 32 * 1024,
|
||||
WriteBufferSize: 32 * 1024,
|
||||
}
|
||||
conn, err := upgrader.Upgrade(w, r, nil)
|
||||
|
||||
|
|
Loading…
Reference in New Issue