class documentation

class EchoTransport:

Constructor: EchoTransport(processProtocol)

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):

Initialize our instance variables.

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

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

def write(self, data):

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

closed: int =

Undocumented

data: bytes =

a bytes of data written to us.

proto =

the ProcessProtocol connected to us.