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`.`basic``

module documentation
(source)

Basic protocols, such as line-oriented, netstring, and int prefixed strings.

Class | `FileSender` | A producer that sends the contents of a file to a consumer.
Class | `Int16StringReceiver` | A receiver for int16-prefixed strings.
Class | `Int32StringReceiver` | A receiver for int32-prefixed strings.
Class | `Int8StringReceiver` | A receiver for int8-prefixed strings.
Class | `IntNStringReceiver` | Generic class for length prefixed protocols.
Class | `LineOnlyReceiver` | A protocol that receives only lines.
Class | `LineReceiver` | A protocol that receives lines and/or raw data, depending on mode.
Class | `NetstringReceiver` | A protocol that sends and receives netstrings.
Class | `StatefulStringProtocol` | A stateful string protocol.
Exception | `IncompleteNetstring` | Not enough data to complete a netstring.
Exception | `NetstringParseError` | The incoming data is not in valid Netstring format.
Exception | `StringTooLongError` | Raised when trying to send a string too long for a length prefixed protocol.
Constant | `DEBUG` | Undocumented
Class | `_PauseableMixin` | Undocumented
Class | `_RecvdCompatHack` | Emulates the to-be-deprecated `IntNStringReceiver.recvd` attribute.
Function | `_formatNetstring` | Convert some `bytes` into netstring format.

DEBUG: `int` = (source)

Undocumented

Value

    0

def _formatNetstring(data): (source)

Convert some `bytes` into netstring format.

Parameters
data | `bytes` that will be reformatted.