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.
proto =
the ProcessProtocol connected to us.
data =
a bytes of data written to us.
def __init__(self, processProtocol):

Initialize our instance variables.

ParametersprocessProtocola ProcessProtocol to connect to ourself.
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.

def loseConnection(self):

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

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.