class documentation
class _Client(TypingProtocol): (source)
Undocumented
Method | start |
Start this ClientService , initiating the connection retry loop. |
Method | stop |
Stop trying to connect and disconnect any current connection. |
Method | when |
Retrieve the currently-connected Protocol , or the next one to connect. |
Method | _client |
The current connection has been disconnected. |
Method | _connection |
Deliver connection failures to any ClientService.whenConnected Deferred s that have met their failAfterFailures threshold. |
Method | _connection |
A connection has been made. |
Method | _reconnect |
The wait between connection attempts is done. |
def whenConnected(self, /, failAfterFailures:
Optional[ int]
= None) -> Deferred[ IProtocol]
:
(source)
¶
Retrieve the currently-connected Protocol
, or the next one to connect.
Parameters | |
failOptional[ | number of connection failures after which the Deferred will deliver a Failure (None means the Deferred will only fail if/when the service is stopped). Set this to 1 to make the very first connection failure signal an error. Use 2 to allow one failure but signal an error if the subsequent retry then fails. |
Returns | |
Deferred[ | a Deferred that fires with a protocol produced by the factory passed to __init__. It may:
|
Deliver connection failures to any ClientService.whenConnected
Deferred
s that have met their failAfterFailures threshold.
Parameters | |
failure:Failure | the Failure to fire the Deferred s with. |
A connection has been made.
Parameters | |
protocol:_ReconnectingProtocolProxy | The protocol of the connection. |