A testable protocol with timeout facility.

Instance Variable timedOut set to True if a timeout has been detected. (type: bool)
Method __init__ Initialize the protocol with a task.Clock object.
Method connectionMade Upon connection, set the timeout.
Method dataReceived Reset the timeout on data.
Method connectionLost On connection lost, cancel all timeout operations.
Method timeoutConnection Flags the timedOut variable to indicate the timeout of the connection.
Method callLater Override callLater to use the deterministic clock.

Inherited from Protocol:

Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.

Inherited from TimeoutMixin:

Class Variable timeOut The number of seconds after which to timeout the connection.
Method resetTimeout Reset the timeout count down.
Method setTimeout Change the timeout period
Method __timedOut Undocumented
timedOut =
set to True if a timeout has been detected. (type: bool)
def __init__(self, clock):

Initialize the protocol with a task.Clock object.

def connectionMade(self):
def dataReceived(self, data):
def connectionLost(self, reason=None):

On connection lost, cancel all timeout operations.

def timeoutConnection(self):

Flags the timedOut variable to indicate the timeout of the connection.

def callLater(self, timeout, func, *args, **kwargs):

Override callLater to use the deterministic clock.

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