Package twisted :: Package protocols :: Module policies :: Class TimeoutMixin |
[frames | no frames]

## Class TimeoutMixin

Known Subclasses:
  `HTTPChannel`, `IMAP4Server`, `POP3`, `PostfixTCPMapServer`, `SMTP`

Mixin for protocols which wish to timeout connections

Method Summary
| `__timedOut(self)`
| ``resetTimeout`(self)` Reset the timeout count down
| ``setTimeout`(self, period)` Change the timeout period
| ``timeoutConnection`(self)` Called when the connection times out.

Class Variable Summary
`NoneType` | `_TimeoutMixin__lastReceived` = None
`NoneType` | `_TimeoutMixin__timeoutCall` = None
`NoneType` | `timeOut`: The number of seconds after which to timeout the connection.

Method Details

### resetTimeout(self) Reset the timeout count down

### setTimeout(self, period) Change the timeout period Parameters: `period` - The period, in seconds, to change the timeout to, or `None` to disable the timeout. (type=`int` or `NoneType`)

### timeoutConnection(self) Called when the connection times out. Override to define behavior other than dropping the connection.

Class Variable Details

    ### _TimeoutMixin__lastReceived Type: `NoneType` Value:
        None

    ### _TimeoutMixin__timeoutCall Type: `NoneType` Value:
        None

    ### timeOut The number of seconds after which to timeout the connection. Type: `NoneType` Value:
        None

Generated by Epydoc 2.0 on Sat Oct 25 00:54:56 2003 | http://epydoc.sf.net