class documentation

class LineTester(basic.LineReceiver):

Constructor: LineTester(clock)

View In Hierarchy

A line receiver that parses data received and make actions on some tokens.

Method __init__ If given, use a clock to make callLater calls.
Method connectionMade Create/clean data received on connection.
Method lineLengthExceeded Adjust line mode when long lines received.
Method lineReceived Receive line and make some action for some tokens: pause, rawpause, stop, len, produce, unproduce.
Method rawDataReceived Read raw data, until the quantity specified by a previous 'len' line is reached.
Constant MAX_LENGTH size of a line when lineLengthExceeded will be called.
Instance Variable clock clock simulating reactor callLater. Pass it to constructor if you want to use the pause/rawpause functionalities.
Instance Variable delimiter character used between received lines.
Instance Variable length Undocumented
Instance Variable received Undocumented

Inherited from LineReceiver:

Method clearLineBuffer Clear buffered data.
Method dataReceived Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method sendLine Sends a line to the other end of the connection.
Method setLineMode Sets the line-mode of this receiver.
Method setRawMode Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived.
Instance Variable line_mode Undocumented
Instance Variable _buffer Undocumented
Instance Variable _busyReceiving Undocumented

Inherited from Protocol (via LineReceiver):

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 LineReceiver, Protocol):

Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
Instance Variable transport Undocumented

Inherited from _PauseableMixin (via LineReceiver, Protocol, BaseProtocol):

Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented
Instance Variable paused Undocumented
def __init__(self, clock=None):

If given, use a clock to make callLater calls.

def connectionMade(self):
def lineLengthExceeded(self, line):

Adjust line mode when long lines received.

def lineReceived(self, line):

Receive line and make some action for some tokens: pause, rawpause, stop, len, produce, unproduce.

def rawDataReceived(self, data):

Read raw data, until the quantity specified by a previous 'len' line is reached.

MAX_LENGTH: int =

size of a line when lineLengthExceeded will be called.

Value
64

clock simulating reactor callLater. Pass it to constructor if you want to use the pause/rawpause functionalities.

delimiter: bytes =

character used between received lines.

length =

Undocumented

received: list =

Undocumented