Home | Trees | Index | Help |
---|
Package twisted :: Package internet :: Module protocol :: Class ReconnectingClientFactory |
|
Factory
--+ |ClientFactory
--+ | ReconnectingClientFactory
TendrilFactory
My clients auto-reconnect with an exponential back-off.
Note that clients should call my resetDelay method after they have connected successfully.Method Summary | |
---|---|
Create an instance of a subclass of Protocol. (inherited from Factory )
| |
Called when a connection has failed. | |
clientConnectionLost(self,
connector,
unused_reason)
| |
Make sure startFactory is called. (inherited from Factory )
| |
Make sure stopFactory is called. (inherited from Factory )
| |
Call me after a successful connection to reset. | |
Have this connector connect again, after a suitable delay. | |
Called when a connection has been started. (inherited from ClientFactory )
| |
This will be called before I begin listening on a Port or Connector. (inherited from Factory )
| |
This will be called before I stop listening on all Ports/Connectors. (inherited from Factory )
| |
I put a stop to any attempt to reconnect in progress. |
Instance Variable Summary | |
---|---|
factor
- a multiplicitive factor by which the delay grows | |
initialDelay
- Delay for the first reconnection attempt. | |
jitter
- percentage of randomness to introduce into the delay length to prevent
stampeding. | |
maxDelay
- Maximum number of seconds between connection attempts. |
Class Variable Summary | |
---|---|
NoneType |
connector
|
int |
continueTrying
|
float |
delay
|
float |
factor
|
float |
initialDelay
|
float |
jitter
|
int |
maxDelay
|
NoneType |
maxRetries
|
int |
retries
|
NoneType |
_callID
|
Method Details |
---|
clientConnectionFailed(self, connector, reason)Called when a connection has failed. It may be useful to call connector.connect() - this will reconnect.
|
resetDelay(self)Call me after a successful connection to reset. I reset the delay and the retry counter. |
retry(self, connector=None)Have this connector connect again, after a suitable delay. |
stopTrying(self)I put a stop to any attempt to reconnect in progress. |
Instance Variable Details |
---|
factora multiplicitive factor by which the delay grows |
initialDelayDelay for the first reconnection attempt. |
jitterpercentage of randomness to introduce into the delay length to prevent stampeding. |
maxDelayMaximum number of seconds between connection attempts. |
Class Variable Details |
---|
connector
|
continueTrying
|
delay
|
factor
|
initialDelay
|
jitter
|
maxDelay
|
maxRetries
|
retries
|
_callID
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Thu May 8 13:18:27 2003 | http://epydoc.sf.net |