[Twisted-Python] twisted socksv4 proxy
maoy at cis.upenn.edu
Wed Sep 24 13:35:32 EDT 2003
Is there any doc/example about producer/consumer? What is that streaming
On Wed, 24 Sep 2003, Andrew Bennetts wrote:
> On Wed, Sep 24, 2003 at 01:16:06AM -0400, Yun Mao wrote:
> > Is it true that the only way to see the success of write() is to check the
> > FileDescriptor.dataBuffer?
> There's another way -- if a FileDescriptor is consumer of a producer, it
> will call the producer's pauseProducing when its buffer grows too large
> (look at the abstract.FileDescriptor.write source).
> > I'm thinking that suppose there is one way to check this, and I can
> > somehow add a callback function to the success of each write(), then I can
> > simply call source.stopReading() after write() and startReading() when I
> > get callback.
> You really don't want to do this manually -- you're just going to reinvent
> Twisted's producers/consumers infrastructure. See my other reply.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python