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

class documentation

`class LineOnlyReceiver(protocol.Protocol): (source)`

Known subclasses: `twisted.mail.pop3.AdvancedPOP3Client`, `twisted.mail.pop3.POP3`, `twisted.mail.pop3.POP3Client`, `twisted.mail.smtp.SMTP`, `twisted.protocols.ident.IdentClient`, `twisted.protocols.ident.IdentServer`

View In Hierarchy

A protocol that receives only lines.

This is purely a speed optimisation over LineReceiver, for the cases that raw mode is known to be unnecessary.

Method | `dataReceived` | Translates bytes into lines, and calls lineReceived.
Method | `lineLengthExceeded` | Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.
Method | `lineReceived` | Override this for when each line is received.
Method | `sendLine` | Sends a line to the other end of the connection.
Constant | `MAX_LENGTH` | The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384.
Class Variable | `delimiter` | The line-ending delimiter to use. By default this is `b'\r\n'`.
Instance Variable | `_buffer` | Undocumented

Inherited from `Protocol`:

Method | `connectionLost` | Called when the connection is shut down.
Method | `logPrefix` | Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable | `factory` | Undocumented

Inherited from `BaseProtocol` (via `Protocol`):

Method | `connectionMade` | Called when a connection is made.
Method | `makeConnection` | Make a connection to a transport and a server.
Instance Variable | `connected` | Undocumented
Instance Variable | `transport` | Undocumented

def dataReceived(self, data): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.dataReceived`

Translates bytes into lines, and calls lineReceived.

def lineLengthExceeded(self, line): (source)
overridden in `twisted.mail.pop3.AdvancedPOP3Client`, `twisted.mail.smtp.SMTP`

Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.

def lineReceived(self, line): (source)
overridden in `twisted.mail.pop3.AdvancedPOP3Client`, `twisted.mail.pop3.POP3`, `twisted.mail.pop3.POP3Client`, `twisted.mail.smtp.SMTP`, `twisted.protocols.ident.IdentClient`, `twisted.protocols.ident.IdentServer`

Override this for when each line is received.

Parameters
line:`bytes` | The line which was received with the delimiter removed.

def sendLine(self, line): (source)

Sends a line to the other end of the connection.

Parameters
line:`bytes` | The line to send, not including the delimiter.

MAX_LENGTH: `int` = (source)

The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384.

Value

    16384

delimiter: `bytes` = (source)

The line-ending delimiter to use. By default this is `b'\r\n'`.

_buffer = (source)

Undocumented