msg: disable cork
This commit is contained in:
parent
3e9e39f774
commit
674ed0d14e
@ -29,6 +29,7 @@ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|||||||
# Handle reusing the same 5-tuple if the previous one is still in TIME_WAIT
|
# Handle reusing the same 5-tuple if the previous one is still in TIME_WAIT
|
||||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
|
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_CORK, 0)
|
||||||
|
|
||||||
# Bind the socket to the port
|
# Bind the socket to the port
|
||||||
server_address = ('10.1.0.1', 8000)
|
server_address = ('10.1.0.1', 8000)
|
||||||
|
@ -79,6 +79,7 @@ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|||||||
# Handle reusing the same 5-tuple if the previous one is still in TIME_WAIT
|
# Handle reusing the same 5-tuple if the previous one is still in TIME_WAIT
|
||||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
|
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_CORK, 0)
|
||||||
|
|
||||||
# Bind the socket to the port
|
# Bind the socket to the port
|
||||||
server_address = ('0.0.0.0', 8000)
|
server_address = ('0.0.0.0', 8000)
|
||||||
|
Loading…
Reference in New Issue
Block a user