twisted.protocols.test.test_basic.LineTester(basic.LineReceiver)
class documentationtwisted.protocols.test.test_basic
(View In Hierarchy)
A line receiver that parses data received and make actions on some tokens.
Instance Variable | delimiter | character used between received lines. (type: bytes ) |
Instance Variable | MAX_LENGTH | size of a line when lineLengthExceeded will be called. (type: int ) |
Instance Variable | clock | clock simulating reactor callLater. Pass it to constructor if you want to
use the pause/rawpause functionalities. (type: twisted.internet.task.Clock ) |
Method | __init__ | If given, use a clock to make callLater calls. |
Method | connectionMade | Create/clean data received on connection. |
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. |
Method | lineLengthExceeded | Adjust line mode when long lines received. |
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 | 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. |
Method | sendLine | Sends a line to the other end of the connection. |
Inherited from Protocol (via LineReceiver):
Method | logPrefix | Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Method | connectionLost | Called when the connection is shut down. |
Inherited from BaseProtocol (via LineReceiver, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from _PauseableMixin (via LineReceiver):
Method | pauseProducing | Undocumented |
Method | resumeProducing | Undocumented |
Method | stopProducing | Undocumented |
twisted.internet.task.Clock
)
Receive line and make some action for some tokens: pause, rawpause, stop, len, produce, unproduce.
Read raw data, until the quantity specified by a previous 'len' line is reached.