<HTML>
<HEAD>
<TITLE>Re: [Twisted-Python] Flow control</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>ahh, I felt I missed sth;) thx .. I'll look into that<BR>
<BR>
<BR>
On 11.08.11 23:16, "Christopher Armstrong" <<a href="radix@twistedmatrix.com">radix@twistedmatrix.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On Thu, Aug 11, 2011 at 5:13 PM, Tobias Oberstein <<a href="tobias.oberstein@tavendo.de">tobias.oberstein@tavendo.de</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>For a test driver for a TCP-based protocol (written in Twisted) I want to send data to a<BR>
receiver as fast as the receiver can consume data, but not faster.<BR>
<BR>
Apparently, a naive loop which just does transport.write() does not work. When I do<BR>
reactor.select(0) between the writes, it somehow works, but memory consumption<BR>
of sender is growing fast, since I guess data is buffered within Twisted, right?<BR>
<BR>
I then got over implementing my own application level flow control, where the<BR>
receiver gives feedback of how much it has consumed, and the sender throttles<BR>
itself to that.<BR>
<BR>
However, isn't there a simpler way (without application level flow control)?<BR>
<BR>
In the end, the sender TCP stack must have knowledge of it's window size ..<BR>
is there a way to get at that info?<BR>
<BR>
What is the recommended way?<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
You want to write a producer:<BR>
<BR>
<a href="http://twistedmatrix.com/documents/current/core/howto/producers.html">http://twistedmatrix.com/documents/current/core/howto/producers.html</a><BR>
<BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>