Package twisted :: Package protocols :: Module policies :: Class TimeoutMixin

[frames | no frames]

## Class TimeoutMixin

Known Subclasses:
  `FTP`, `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 May 15 20:08:17 2004 | http://epydoc.sf.net