module documentation

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.


def _formatNetstring(data): (source)

Convert some bytes into netstring format.

databytes that will be reformatted.