diff --git a/src/msg_client.py b/src/msg_client.py index 888a1a1..822c32d 100644 --- a/src/msg_client.py +++ b/src/msg_client.py @@ -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 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_CORK, 0) # Bind the socket to the port server_address = ('10.1.0.1', 8000) diff --git a/src/msg_server.py b/src/msg_server.py index 651cb2c..0f9ae74 100644 --- a/src/msg_server.py +++ b/src/msg_server.py @@ -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 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_CORK, 0) # Bind the socket to the port server_address = ('0.0.0.0', 8000)