[Zodb-checkins] CVS: Packages/ZEO/zrpc - server.py:1.3 client.py:1.3

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 2 Jul 2002 03:31:36 -0400


Update of /cvs-repository/Packages/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv19728/zrpc

Modified Files:
	server.py client.py 
Log Message:
turn on TCP_NODELAY, in both directions. This avoids latency when a request or response doesnt fit in one packet. ZEO is already doing its best to buffer data before calling send, so TCP_NODELAY can do little harm

=== Packages/ZEO/zrpc/server.py 1.2 => 1.3 ===
         else:
             self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
+        self.setsockopt(socket.IPPROTO_TCP, 1, 1) # TCP_NODELAY
         self.set_reuse_addr()
         log("listening on %s" % str(self.addr))
         self.bind(self.addr)


=== Packages/ZEO/zrpc/client.py 1.2 => 1.3 ===
                     continue
                 s.setblocking(0)
+                s.setsockopt(socket.IPPROTO_TCP, 1, 1) # TCP_NODELAY
                 self.sockets[s] = addr
                 # connect() raises Connected iff it succeeds
                 # XXX can still block for a while if addr requires DNS