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`.`amp`.`_SwitchBox``

class documentation

`class _SwitchBox(AmpBox): (source)`

View In Hierarchy

Implementation detail of ProtocolSwitchCommand: I am an AmpBox which sets up state for the protocol to switch.

Method | `__init__` | Create a _SwitchBox with the protocol to switch to after being sent.
Method | `__repr__` | Undocumented
Instance Variable | `innerProto` | Undocumented
Method | `_sendTo` | Send me; I am the last box on the connection. All further traffic will be over the new protocol.

Inherited from `AmpBox`:

Method | `copy` | Return another AmpBox just like me.
Method | `serialize` | Convert me into a wire-encoded string.
Class Variable | `__slots__` | Undocumented

def __init__(self, innerProto, **kw): (source)
overrides `twisted.protocols.amp.AmpBox.__init__`

Create a _SwitchBox with the protocol to switch to after being sent.

Parameters
innerProto:an IProtocol provider. | the protocol instance to switch to.
**kw | Undocumented

def __repr__(self): (source)
overrides `twisted.protocols.amp.AmpBox.__repr__`

Undocumented

Returns
`str` | Undocumented

innerProto = (source)

Undocumented

def _sendTo(self, proto): (source)
overrides `twisted.protocols.amp.AmpBox._sendTo`

Send me; I am the last box on the connection. All further traffic will be over the new protocol.