http://bugs.python.org/issue6192

Mergin revisions 73272 and 73546 to py3k
parent 8f480e54
...@@ -646,8 +646,15 @@ class StreamRequestHandler(BaseRequestHandler): ...@@ -646,8 +646,15 @@ class StreamRequestHandler(BaseRequestHandler):
rbufsize = -1 rbufsize = -1
wbufsize = 0 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): def setup(self):
self.connection = self.request 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.rfile = self.connection.makefile('rb', self.rbufsize)
self.wfile = self.connection.makefile('wb', self.wbufsize) self.wfile = self.connection.makefile('wb', self.wbufsize)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment