<HTML>
<HEAD>
<TITLE>Re: [Twisted-Python] Flush socket</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>so there is no Twisted sanctioned (reactor independent and reentry safe) alternative to disable nagle (tcp nodelay) and doing a select()?<BR>
<BR>
ps: to give an example of how that was at least practically useful in what i try to do .. and not only blabbing away:<BR>
<BR>
<a href="http://www.tavendo.de/autobahn/testsuite/report/">http://www.tavendo.de/autobahn/testsuite/report/</a><BR>
<BR>
for these 2 cases, the only difference are the calls to reactor.select()<BR>
<BR>
<a href="http://www.tavendo.de/autobahn/testsuite/report/firefox_7_0a_20110809_case_5_19.html">http://www.tavendo.de/autobahn/testsuite/report/firefox_7_0a_20110809_case_5_19.html</a><BR>
<BR>
<a href="http://www.tavendo.de/autobahn/testsuite/report/firefox_7_0a_20110809_case_5_20.html">http://www.tavendo.de/autobahn/testsuite/report/firefox_7_0a_20110809_case_5_20.html</a><BR>
<BR>
by which I found<BR>
<BR>
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=675961">https://bugzilla.mozilla.org/show_bug.cgi?id=675961</a><BR>
<BR>
<BR>
On 11.08.11 23:13, &quot;Christopher Armstrong&quot; &lt;<a href="radix@twistedmatrix.com">radix@twistedmatrix.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
On Thu, Aug 11, 2011 at 5:06 PM, Tobias Oberstein &lt;<a href="tobias.oberstein@tavendo.de">tobias.oberstein@tavendo.de</a>&gt; wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>For testing implementations of a TCP-based protocol, I am testing<BR>
if an implementation is agnostic wrt to in what chops in receives<BR>
octets from the wire (&quot;stream clean&quot;).<BR>
<BR>
To do that, I force out octets from the protocol test driver (written<BR>
in Twisted) in differently sized chops, down to single octets.<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
While this is a noble goal, your method isn't really right: in TCP, the chunks you write on one end do not correspond to the chunks you receive on the other end after they've gone through a TCP stack and network. The best way to verify that your client is stream clean is to write unit tests that explicitly call its dataReceived method with different-sized chunks.<BR>
<BR>
-- <BR>
Christopher Armstrong<BR>
<a href="http://radix.twistedmatrix.com/">http://radix.twistedmatrix.com/</a><BR>
<a href="http://planet-if.com/">http://planet-if.com/</a><BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>