Package twisted :: Package protocols :: Module htb :: Class ShapedProtocolFactory |
[show private | hide private]
[frames | no frames]

## Class ShapedProtocolFactory

I dispense Protocols with traffic shaping on their transports.

Usage:

       myserver = SomeFactory()
       myserver.protocol = ShapedProtocolFactory(myserver.protocol,
                                                 bucketFilter)

Where SomeServerFactory is a `twisted.internet.protocol.Factory`, and bucketFilter is an instance of `HierarchicalBucketFilter`.

Method Summary
| ``__init__`(self, protoClass, bucketFilter)` Tell me what to wrap and where to get buckets.
| ``__call__`(self, *a, **kw)` Make a Protocol instance with a shaped transport.

Method Details

### __init__(self, protoClass, bucketFilter) (Constructor) Tell me what to wrap and where to get buckets. Parameters: `protoClass` - The class of Protocol I will generate wrapped instances of. (type=`Protocol<twisted.internet.interfaces.IProtocol>` class) `bucketFilter` - The filter which will determine how traffic is shaped. (type=`HierarchicalBucketFilter`.)

### __call__(self, *a, **kw) (Call operator) Make a Protocol instance with a shaped transport. Any parameters will be passed on to the protocol's initializer. Returns: a Protocol instance with a `ShapedTransport`.

Generated by Epydoc 1.1 on Thu May 8 13:16:37 2003 | http://epydoc.sf.net