Mergin revisions 73272 and 73546 to py3k
This commit is contained in:
Kristján Valur Jónsson 2009-06-28 21:34:22 +00:00
parent 8f480e5401
commit 41a5750656

View file

@ -646,8 +646,15 @@ class StreamRequestHandler(BaseRequestHandler):
rbufsize = -1
wbufsize = 0
# Disable nagle algoritm for this socket, if True.
# Use only when wbufsize != 0, to avoid small packets.
disable_nagle_algorithm = False
def setup(self):
self.connection = self.request
if self.disable_nagle_algorithm:
self.connection.setsockopt(socket.IPPROTO_TCP,
socket.TCP_NODELAY, True)
self.rfile = self.connection.makefile('rb', self.rbufsize)
self.wfile = self.connection.makefile('wb', self.wbufsize)