Package twisted :: Package protocols :: Module htb :: Class ShapedTransport

[frames | no frames]

## Class ShapedTransport

    BasicProducerConsumerProxy --+
                                 |
             ProducerConsumerProxy --+
                                     |
                        ShapedConsumer --+
                                         |
                                        ShapedTransport

I wrap a Transport and shape the rate at which it receives data.

I am a `ShapedConsumer` with a little bit of magic to provide for the case where the consumer I wrap is also a Transport and people will be attempting to access attributes I do not proxy as a Consumer (e.g. loseConnection).

Method Summary
| `__getattr__(self, name)`
Inherited from ShapedConsumer
| ``__init__`(self, consumer, bucket)`
| ``_writeSomeData`(self, data)` Write as much of this data as possible.
| ``stopProducing`(self)`
Inherited from ProducerConsumerProxy
| ``pauseProducing`(self)`
| ``registerProducer`(self, producer, streaming)`
| ``resumeProducing`(self)`
| ``unregisterProducer`(self)`
| ``write`(self, data)`
Inherited from BasicProducerConsumerProxy
| ``__repr__`(self)`
| ``finish`(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` | `iAmStreaming` = 0
Inherited from ProducerConsumerProxy
`int` | `bufferSize` = 65536
`int` | `producerPaused` = 0
`int` | `unregistered` = 0
Inherited from BasicProducerConsumerProxy
`tuple` | `__implements__` = `(<class twisted.internet.interfaces.IPr...`
`int` | `outstandingPull` = 0
`NoneType` | `producerIsStreaming` = None
`int` | `stopped` = 0

Class Variable Details

### iAmStreaming

  Type:
    `int`
  Value:

        0

Generated by Epydoc 2.0 on Sat May 15 20:07:55 2004 | http://epydoc.sf.net