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
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 | data |
Translates bytes into lines, and calls lineReceived. |
Method | line |
Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way. |
Method | line |
Override this for when each line is received. |
Method | send |
Sends a line to the other end of the connection. |
Constant | MAX |
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 | connection |
Called when the connection is shut down. |
Method | log |
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 | connection |
Called when a connection is made. |
Method | make |
Make a connection to a transport and a server. |
Instance Variable | connected |
Undocumented |
Instance Variable | transport |
Undocumented |
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.
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. |
Sends a line to the other end of the connection.
Parameters | |
line:bytes | The line to send, not including the delimiter. |