From 674ed0d14ebeb1e885f3c7f7d63f6c682a05ae8c Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Thu, 23 Feb 2017 14:49:44 +0100 Subject: [PATCH] msg: disable cork --- src/msg_client.py | 1 + src/msg_server.py | 1 + 2 files changed, 2 insertions(+) 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)