| 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. | |
(Deprecated) (inherited from Protocol)
| |
Called when the connection is shut down. | |
Called when a connection is made. (inherited from ProtocolWrapper)
| |
Called whenever data is received. | |
getHost(self)
(inherited from ProtocolWrapper)
| |
getPeer(self)
(inherited from ProtocolWrapper)
| |
loseConnection(self)
(inherited from ProtocolWrapper)
| |
registerProducer(self,
producer,
streaming)
(inherited from ProtocolWrapper)
| |
Reset the timeout, usually because some activity just happened. | |
Set a timeout. | |
stopConsuming(self)
(inherited from ProtocolWrapper)
| |
This method is called when the timeout is triggered. | |
unregisterProducer(self)
(inherited from ProtocolWrapper)
| |
write(self,
data)
| |
writeSequence(self,
seq)
| |
| Method Details |
|---|
__init__(self,
factory,
wrappedProtocol,
timeoutPeriod)
Constructor.
|
cancelTimeout(self)Cancel the timeout. If the timeout was already cancelled, this does nothing. |
connectionLost(self, reason)Called when the connection is shut down. Clear any circular references here, and any external references to this Protocol. The connection has been closed.
|
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 1.1 on Fri Jun 27 03:45:53 2003 | http://epydoc.sf.net |