class documentation
class EchoTransport: (source)
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.
Method | __init__ |
Initialize our instance variables. |
Method | lose |
If we're asked to disconnect (and we haven't already) shut down the ProcessProtocol with a 0 exit code. |
Method | write |
We got some data. Give it back to our ProcessProtocol with a newline attached. Disconnect if there's a null byte. |
Instance Variable | closed |
Undocumented |
Instance Variable | data |
a bytes of data written to us. |
Instance Variable | proto |
the ProcessProtocol connected to us. |
Initialize our instance variables.
Parameters | |
process | a ProcessProtocol to connect to ourself. |
If we're asked to disconnect (and we haven't already) shut down the ProcessProtocol with a 0 exit code.