Utility to pump data between clients and servers for protocol testing.

Perhaps this is a utility worthy of being in protocol.py?

Method __init__ Undocumented
Method flush Pump until there is no more input or output or until stop is called. This does not run any timers, so don't use it with any code that calls reactor.callLater.
Method stop Stop a running flush operation, even if data remains to be transferred.
Method pump Move data back and forth.
def __init__(self, client, server, clientIO, serverIO):
Undocumented
def flush(self):

Pump until there is no more input or output or until stop is called. This does not run any timers, so don't use it with any code that calls reactor.callLater.

def stop(self):

Stop a running flush operation, even if data remains to be transferred.

def pump(self):

Move data back and forth.

Returns whether any data was moved.

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