Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`protocols`.`htb`.`ShapedProtocolFactory``

class documentation

`class 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 | `__call__` | Make a `Protocol` instance with a shaped transport.
Method | `__init__` | Tell me what to wrap and where to get buckets.
Instance Variable | `bucketFilter` | Undocumented
Instance Variable | `protocol` | 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.

Returns
A `Protocol` instance with a `ShapedTransport`.

def __init__(self, protoClass, bucketFilter): (source)

Tell me what to wrap and where to get buckets.

Parameters
protoClass:`Protocol` class | The class of `Protocol` this will generate wrapped instances of.
bucketFilter:`HierarchicalBucketFilter`. | The filter which will determine how traffic is shaped.

bucketFilter = (source)

Undocumented

protocol = (source)

Undocumented