Package twisted :: Package internet :: Module interfaces :: Class IConsumer |
[frames | no frames]

## Class IConsumer

    Interface --+
                |
               IConsumer

Known Subclasses:
  `IFinishableConsumer`

A consumer consumes data from a producer.

Method Summary
| ``registerProducer`(self, producer, streaming)` Register to receive data from a producer.
| ``unregisterProducer`(self)` Stop consuming data from a producer, without disconnecting.
| ``write`(self, data)` The producer will write data by calling this method.

Method Details

### registerProducer(self, producer, streaming) Register to receive data from a producer. This sets self to be a consumer for a producer. When this object runs out of data on a write() call, it will ask the producer to resumeProducing(). A producer should implement the IProducer interface. A push producer which is unable to pause or stop need not register or unregister.

### unregisterProducer(self) Stop consuming data from a producer, without disconnecting.

### write(self, data) The producer will write data by calling this method.

Generated by Epydoc 2.0 on Sat Oct 25 00:55:00 2003 | http://epydoc.sf.net