class documentation

A testable protocol with timeout facility.

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

Inherited from Protocol:

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

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
Instance Variable transport Undocumented

Inherited from TimeoutMixin (via Protocol, BaseProtocol):

Method resetTimeout Reset the timeout count down.
Method setTimeout Change the timeout period
Method __timedOut Undocumented
Instance Variable __timeoutCall Undocumented
def __init__(self, clock): (source)

Initialize the protocol with a task.Clock object.

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

Override callLater to use the deterministic clock.

def connectionLost(self, reason=None): (source)

On connection lost, cancel all timeout operations.

def connectionMade(self): (source)
def dataReceived(self, data): (source)
def timeoutConnection(self): (source)

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

Undocumented

timedOut: bool = (source)

set to True if a timeout has been detected.