class documentation

class twisted.protocols.htb.ShapedConsumer(pcp.ProducerConsumerProxy): (source)

Known subclasses: twisted.protocols.htb.ShapedTransport

View In Hierarchy

Wraps a Consumer and shapes the rate at which it receives data.

Class Variable iAmStreaming Undocumented
Method __init__ Undocumented
Instance Variable bucket Undocumented
Method stopProducing Stop producing data.
Method _writeSomeData Write as much of this data as possible.

Inherited from ProducerConsumerProxy:

Class Variable bufferSize Undocumented
Instance Variable producerPaused Undocumented
Instance Variable unregistered Undocumented
Method pauseProducing Undocumented
Instance Variable paused Undocumented
Method resumeProducing Undocumented
Instance Variable outstandingPull Undocumented
Method write The producer will write data by calling this method.
Method registerProducer Register to receive data from a producer.
Method unregisterProducer Stop consuming data from a producer, without disconnecting.

Inherited from BasicProducerConsumerProxy (via ProducerConsumerProxy):

Instance Variable producer the Producer I subscribe to.
Instance Variable consumer the Consumer I publish to.
Instance Variable producerIsStreaming Undocumented
Class Variable stopped Undocumented
Method finish Undocumented
Method __repr__ Undocumented
Instance Variable _buffer Undocumented
def __init__(self, consumer, bucket): (source)
bucket = (source)

Undocumented

def _writeSomeData(self, data): (source)

Write as much of this data as possible.

ReturnsThe number of bytes written.
def stopProducing(self): (source)

Stop producing data.

This tells a producer that its consumer has died, so it must stop producing data for good.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.