You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add disable_nagle_algorithm to SocketServer.TCPServer #50442
It is useful to be able to disable the Nagle algoritm on socket
connections from the TCPServer. These are typically used by HTTP servers.
If combined with write buffering (setting RequestHangler.wbufsize = -1) it
can make sure that http responses are not subject to Nagle/Delayed-ack
delays. Disabling Nagle in addition to providing the buffering is
necessary to make sure that the final wfile.flush() arrives promptly, in
case a previous flush occurred and the final flush is small.
On consideration, it is more appropariate to have the
disable_nagle_algorithm as part of StreamRequestHandler rather than in the
TCPSockerServer. It then sits right next to the rfile and wfile that
affect it.
The RequestHandlers aren't documented as extensively as the socket
servers, though, so the documentation will have to go.
Attached is a patch.
Activity
kristjanvalur commentedon Jun 4, 2009
It is useful to be able to disable the Nagle algoritm on socket
connections from the TCPServer. These are typically used by HTTP servers.
If combined with write buffering (setting RequestHangler.wbufsize = -1) it
can make sure that http responses are not subject to Nagle/Delayed-ack
delays. Disabling Nagle in addition to providing the buffering is
necessary to make sure that the final wfile.flush() arrives promptly, in
case a previous flush occurred and the final flush is small.
A patch is provided.
pitrou commentedon Jun 4, 2009
Looks ok to me.
kristjanvalur commentedon Jun 7, 2009
Committed in revision 73272
pitrou commentedon Jun 8, 2009
This patch should be committed to py3k after 3.1 is released.
kristjanvalur commentedon Jun 15, 2009
On consideration, it is more appropariate to have the
disable_nagle_algorithm as part of StreamRequestHandler rather than in the
TCPSockerServer. It then sits right next to the rfile and wfile that
affect it.
The RequestHandlers aren't documented as extensively as the socket
servers, though, so the documentation will have to go.
Attached is a patch.
kristjanvalur commentedon Jun 24, 2009
Second patch applied in 73546
kristjanvalur commentedon Jun 28, 2009
Merged into py3k in revision 73648