class documentation

class twisted.protocols.htb.ShapedProtocolFactory: (source)

View In Hierarchy

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 __init__ Tell me what to wrap and where to get buckets.
Instance Variable protocol Undocumented
Instance Variable bucketFilter Undocumented
Method __call__ Make a Protocol instance with a shaped transport.
def __init__(self, protoClass, bucketFilter): (source)

Tell me what to wrap and where to get buckets.

ParametersprotoClassThe class of Protocol this will generate wrapped instances of. (type: Protocol class)
bucketFilterThe filter which will determine how traffic is shaped. (type: HierarchicalBucketFilter.)
protocol = (source)

Undocumented

bucketFilter = (source)

Undocumented

def __call__(self, *a, **kw): (source)

Make a Protocol instance with a shaped transport.

Any parameters will be passed on to the protocol's initializer.

ReturnsA Protocol instance with a ShapedTransport.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.