From f45d57950be45dbaccd291ec9e8b60953019e71c Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Wed, 11 Nov 2015 22:45:09 +0800 Subject: [PATCH] default buffer setting --- shadowsocks/tcprelay.py | 4 ---- shadowsocks/udprelay.py | 2 -- 2 files changed, 6 deletions(-) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 028e33d..e8ae775 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -480,10 +480,6 @@ class TCPRelayHandler(object): remote_sock_v6 = socket.socket(af, socktype, proto) self._remote_sock_v6 = remote_sock_v6 self._fd_to_handlers[remote_sock_v6.fileno()] = self - remote_sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 1024 * 32) - remote_sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024 * 32) - remote_sock_v6.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 1024 * 32) - remote_sock_v6.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024 * 32) remote_sock.setblocking(False) if self._remote_udp: diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index 5519466..c6a69b7 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -914,8 +914,6 @@ class UDPRelay(object): server_socket = socket.socket(af, socktype, proto) server_socket.bind((self._listen_addr, self._listen_port)) server_socket.setblocking(False) - server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 1024 * 32) - server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024 * 32) self._server_socket = server_socket self._stat_callback = stat_callback