summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-08-07 19:17:20 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-08-07 19:17:20 +0000
commitc0a358cb8481178d3e9af29cc86eef27a72138d8 (patch)
tree5016eb95dff545c3fe59c8309fc5c57661690eb2 /examples
parent80d3a4260536df00e015b42013558d8a2a724d17 (diff)
downloadpyserial-c0a358cb8481178d3e9af29cc86eef27a72138d8.tar.gz
set TCP_NODELAY option to get more responsive connection (though it may waste bandwith depending on application)
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@324 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'examples')
-rw-r--r--examples/port_publisher.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/port_publisher.py b/examples/port_publisher.py
index fb6f028..23839dc 100644
--- a/examples/port_publisher.py
+++ b/examples/port_publisher.py
@@ -256,6 +256,7 @@ class Forwarder(ZeroconfService):
if self.socket is None:
self.socket = connection
self.socket.setblocking(0)
+ self.socket.setsockopt( socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
if not options.quiet:
print '%s: Connected by %s:%s' % (self.device, addr[0], addr[1])
self.rfc2217 = serial.rfc2217.PortManager(self.serial, self, debug_output=False)