[Twisted-Python] Flush socket

Tobias Oberstein tobias.oberstein at tavendo.de
Thu Aug 11 15:54:11 MDT 2011


sorry, my question wasn't clear:

I do already disable Nagle by setting TCP NoDelay.

And I do a reactor.select(0), which sometimes breaks I guess
because of reactor reentry not expected, and it will break
when the reactor is not select() based I guess.

So the question is: is there an alternative to reactor.select(0)
after a transport.write() to make the reactor call write() on
the underlying socket for all stuff buffered within Twisted?


On 11.08.11 23:47, "Itamar Turner-Trauring" <itamar at itamarst.org> wrote:

> so there is no Twisted sanctioned (reactor independent and reentry safe)
> alternative to disable nagle (tcp nodelay) and doing a select()?

You can disable nagle in Twisted, if that's the question
(transport.setTcpNoDelay(True)). But you can't determine TCP packet size,
that's up to the operating system.


_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20110811/1533f5ee/attachment.html>


More information about the Twisted-Python mailing list