[Twisted-Python] Flush socket

Tobias Oberstein tobias.oberstein at tavendo.de
Thu Aug 11 17:54:11 EDT 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110811/1533f5ee/attachment.htm 

More information about the Twisted-Python mailing list