Package twisted :: Package protocols :: Module pcp :: Class ProducerConsumerProxy |
[frames | no frames]

## Class ProducerConsumerProxy

    BasicProducerConsumerProxy --+
                                 |
                                ProducerConsumerProxy

Known Subclasses:
  `ShapedConsumer`

ProducerConsumerProxy with a finite buffer.

When my buffer fills up, I have my parent Producer pause until my buffer has room in it again.

Method Summary
| ``_writeSomeData`(self, data)` Write as much of this data as possible.
| `pauseProducing(self)`
| `registerProducer(self, producer, streaming)`
| `resumeProducing(self)`
| `unregisterProducer(self)`
| `write(self, data)`
Inherited from BasicProducerConsumerProxy
| ``__init__`(self, consumer)`
| ``__repr__`(self)`
| ``finish`(self)`
| ``stopProducing`(self)`

Instance Variable Summary
Inherited from BasicProducerConsumerProxy
`IConsumer` | `consumer`: the Consumer I publish to.
bool | `paused`: As a Producer, am I paused?
`IProducer` | `producer`: the Producer I subscribe to.

Class Variable Summary
`int` | `bufferSize` = 65536
`int` | `producerPaused` = 0
`int` | `unregistered` = 0
Inherited from BasicProducerConsumerProxy
`tuple` | `__implements__` = `(<class twisted.internet.interfaces.IPr...`
`int` | `iAmStreaming` = 1
`int` | `outstandingPull` = 0
`NoneType` | `producerIsStreaming` = None
`int` | `stopped` = 0

Method Details

### _writeSomeData(self, data) Write as much of this data as possible. Returns: The number of bytes written.

Class Variable Details

    ### bufferSize Type: `int` Value:
        65536

    ### producerPaused Type: `int` Value:
        0

    ### unregistered Type: `int` Value:
        0

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