commit
dd37830b80
@ -33,6 +33,7 @@ class DisposablePeer:
|
|||||||
self.__socket.setblocking(False)
|
self.__socket.setblocking(False)
|
||||||
# To reduce the latency:
|
# To reduce the latency:
|
||||||
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True)
|
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True)
|
||||||
|
if hasattr(socket, 'TCP_QUICKACK'):
|
||||||
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, True)
|
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, True)
|
||||||
res = self.__socket.connect_ex(peer_addr)
|
res = self.__socket.connect_ex(peer_addr)
|
||||||
if res != errno.EINPROGRESS:
|
if res != errno.EINPROGRESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user