class documentation

class EchoTransport: (source)

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.

Method __init__ Initialize our instance variables.
Method loseConnection 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.
def __init__(self, processProtocol): (source)

Initialize our instance variables.

Parameters
processProtocola ProcessProtocol to connect to ourself.
def loseConnection(self): (source)

If we're asked to disconnect (and we haven't already) shut down the ProcessProtocol with a 0 exit code.

def write(self, data): (source)

We got some data. Give it back to our ProcessProtocol with a newline attached. Disconnect if there's a null byte.

Undocumented

a bytes of data written to us.

the ProcessProtocol connected to us.