Package twisted :: Package protocols :: Module http :: Class HTTPChannel |
[show private | hide private]
[frames | no frames]

## Class HTTPChannel

    BaseProtocol --+
                   |
            Protocol --+
                       |
            LineReceiver --+
                           |
                          HTTPChannel

Known Subclasses:
  `Proxy`, `ReverseProxy`

A receiver for HTTP requests.

Method Summary
| `__init__(self)`
| `allContentReceived(self)`
| `allHeadersReceived(self)`
| ``checkPersistence`(self, request, version)` Check if the channel should close or not.
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down.
| ``dataReceived`(self, data)` Protocol.dataReceived. (inherited from `LineReceiver`)
| ``headerReceived`(self, line)` Do pre-processing (for content-length) and store this header away.
| ``lineLengthExceeded`(self, line)` Called when the maximum line length has been reached. (inherited from `LineReceiver`)
| ``lineReceived`(self, line)` Override this for when each line is received.
| ``rawDataReceived`(self, data)` Override this for when raw data is received.
| ``requestDone`(self, request)` Called by first request in queue when it is done.
| ``sendLine`(self, line)` Sends a line to the other end of the connection. (inherited from `LineReceiver`)
| ``setLineMode`(self, extra)` Sets the line-mode of this receiver. (inherited from `LineReceiver`)
| ``setRawMode`(self)` Sets the raw mode of this receiver. (inherited from `LineReceiver`)

Class Variable Summary
`int` | `length`
`int` | `persistent`
`class` | `Request`

Method Details

### checkPersistence(self, request, version) Check if the channel should close or not.

### 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. Parameters: `reason` (type=`twisted.python.failure.Failure`) Overrides: `twisted.internet.protocol.Protocol.connectionLost` (inherited documentation)

### headerReceived(self, line) Do pre-processing (for content-length) and store this header away.

### lineReceived(self, line) Override this for when each line is received. Overrides: `twisted.protocols.basic.LineReceiver.lineReceived` (inherited documentation)

### rawDataReceived(self, data) Override this for when raw data is received. Overrides: `twisted.protocols.basic.LineReceiver.rawDataReceived` (inherited documentation)

### requestDone(self, request) Called by first request in queue when it is done.

Class Variable Details

    ### length Type: `int` Value:
        0

    ### persistent Type: `int` Value:
        1

### Request `Request` = `twisted.protocols.http.Request`

Generated by Epydoc 1.1 on Thu May 8 13:16:37 2003 | http://epydoc.sf.net