| Home | Trees | Index | Help |
|
|---|
| Package twisted :: Package protocols :: Module policies :: Class TimeoutProtocol |
|
BaseProtocol--+ |Protocol--+ |ProtocolWrapper--+ | TimeoutProtocol
Protocol that automatically disconnects when the connection is idle.
Stability: Unstable| Method Summary | |
|---|---|
Constructor. | |
Cancel the timeout. | |
connectionLost(self,
reason)
| |
Called whenever data is received. | |
Reset the timeout, usually because some activity just happened. | |
Set a timeout. | |
This method is called when the timeout is triggered. | |
write(self,
data)
| |
writeSequence(self,
seq)
| |
| Inherited from ProtocolWrapper | |
| |
Called when a connection is made. | |
| |
| |
| |
Make a connection to a transport and a server. | |
| |
| |
| |
| Inherited from Protocol | |
(Deprecated) | |
| Class Variable Summary | |
|---|---|
| Inherited from ProtocolWrapper | |
tuple |
__implements__ = (<class twisted.internet.interfaces.ITr...
|
int |
disconnecting = 0 |
| Inherited from BaseProtocol | |
int |
connected = 0 |
NoneType |
transport = None |
| Method Details |
|---|
__init__(self,
factory,
wrappedProtocol,
timeoutPeriod)
Constructor.
|
cancelTimeout(self)Cancel the timeout. If the timeout was already cancelled, this does nothing. |
dataReceived(self, data)Called whenever data is received. Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.
|
resetTimeout(self)Reset the timeout, usually because some activity just happened. |
setTimeout(self, timeoutPeriod=None)Set a timeout. This will cancel any existing timeouts.
|
timeoutFunc(self)This method is called when the timeout is triggered. By default it callsloseConnection. Override this if you want
something else to happen.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.0 on Sat May 15 20:08:02 2004 | http://epydoc.sf.net |