[Twisted-Python] Flow control
radix at twistedmatrix.com
Thu Aug 11 17:16:55 EDT 2011
On Thu, Aug 11, 2011 at 5:13 PM, Tobias Oberstein <
tobias.oberstein at tavendo.de> wrote:
> For a test driver for a TCP-based protocol (written in Twisted) I want to
> send data to a
> receiver as fast as the receiver can consume data, but not faster.
> Apparently, a naive loop which just does transport.write() does not work.
> When I do
> reactor.select(0) between the writes, it somehow works, but memory
> of sender is growing fast, since I guess data is buffered within Twisted,
> I then got over implementing my own application level flow control, where
> receiver gives feedback of how much it has consumed, and the sender
> itself to that.
> However, isn't there a simpler way (without application level flow
> In the end, the sender TCP stack must have knowledge of it's window size ..
> is there a way to get at that info?
> What is the recommended way?
You want to write a producer:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python