mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Mergin revisions 73272 and 73546 to py3k
This commit is contained in:
parent
8f480e5401
commit
41a5750656
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue