twisted.conch.test.test_session.EchoTransport
class documentationtwisted.conch.test.test_session
(View In Hierarchy)
A transport for a ProcessProtocol which echos data that is sent to it
with a Window newline (CR LF) appended to it. If a null byte is in the
data, disconnect. When we are asked to disconnect, disconnect the
ProcessProtocol
with a 0 exit code.
Instance Variable | proto | the ProcessProtocol connected to us. |
Instance Variable | data | a bytes
of data written to us. |
Method | __init__ | Initialize our instance variables. |
Method | write | We got some data. Give it back to our ProcessProtocol with
a newline attached. Disconnect if there's a null byte. |
Method | loseConnection | If we're asked to disconnect (and we haven't already) shut down the
ProcessProtocol with a 0 exit code. |
Initialize our instance variables.
Parameters | processProtocol | a ProcessProtocol to connect to ourself. |