summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-04 17:13:27 +0200
committerNicolas Schodet2008-04-04 17:13:27 +0200
commit1822a0a6f82e47f688e374cd48e4c497b2fb15e6 (patch)
tree3d4980e1c78103ea3566e2dab177836beed56e6d /host
parent717fe69af7efc907ab8adad105504176262a1ed5 (diff)
* digital/avr/modules/host, host/mex:
- added TCP_NODELAY option.
Diffstat (limited to 'host')
-rw-r--r--host/mex/mex/hub.py1
-rw-r--r--host/mex/mex/node.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/host/mex/mex/hub.py b/host/mex/mex/hub.py
index 5255ae1d..a3dd785b 100644
--- a/host/mex/mex/hub.py
+++ b/host/mex/mex/hub.py
@@ -40,6 +40,7 @@ class Hub:
self.date = 0
self.socket = socket.socket ()
self.socket.setsockopt (socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ self.socket.setsockopt (socket.SOL_TCP, socket.TCP_NODELAY, 1)
self.socket.bind (self.addr)
self.socket.listen (5)
diff --git a/host/mex/mex/node.py b/host/mex/mex/node.py
index c51d7c79..e54d1ba6 100644
--- a/host/mex/mex/node.py
+++ b/host/mex/mex/node.py
@@ -37,6 +37,7 @@ class Node:
def __init__ (self, addr = mex.DEFAULT_ADDR):
"""Create a new Node and connect it to given Hub address."""
self.socket = socket.socket ()
+ self.socket.setsockopt (socket.SOL_TCP, socket.TCP_NODELAY, 1)
self.socket.connect (addr)
self.date = 0
self.seq = 0