The best way to come to a good understanding of IConsumer and IProducer is to write something that transfers large amounts of data over a slow, or heavily asymmetric link, and make sure its memory usage stays consistent; just implementing the methods on IConsumer won't be that illuminating.
> On Sep 9, 2015, at 7:36 PM, Roshan Cherian <cherian.r...@gmail.com> wrote: > > Thanks Glyph for setting my understanding right on this. By create a consumer > I meant having to write one purely to understand the concept and have one > running example so that when looking at consumers like ProducerStream it will > make my understanding more clear. > > Thanks, > -Roshan > > On Wed, Sep 9, 2015 at 11:40 AM, Glyph Lefkowitz <gl...@twistedmatrix.com > <mailto:gl...@twistedmatrix.com>> wrote: > >> On Sep 8, 2015, at 11:24 PM, Roshan Cherian <cherian.r...@gmail.com >> <mailto:cherian.r...@gmail.com>> wrote: >> >> I understand there is >> https://twistedmatrix.com/documents/15.4.0/core/howto/producers.html >> <https://twistedmatrix.com/documents/15.4.0/core/howto/producers.html>, >> however I was hoping if there is an example of a simple consumer which could >> be written using the data from dataReceived (that is assuming whatever I >> understood above is correct). I didn't find enough information on how to >> create a consumer. > > What do you mean by "create a consumer"? You already have an IConsumer > created for you: your transport. Do you want to implement your own? For > what reason? > > -glyph > > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com <mailto:Twisted-Python@twistedmatrix.com> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > <http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python> > > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python