Browse Source

default buffer setting

dev
BreakWa11 9 years ago
parent
commit
f45d57950b
  1. 4
      shadowsocks/tcprelay.py
  2. 2
      shadowsocks/udprelay.py

4
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:

2
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

Loading…
Cancel
Save