Package twisted :: Package web :: Module proxy :: Class Proxy |
[show private | hide private]
[frames | no frames]

## Class Proxy

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

This class implements a simple web proxy.

Since it inherits from twisted.protocols.http.HTTPChannel, to use it you should do something like this:

       from twisted.protocols import http
       f = http.HTTPFactory()
       f.HTTPChannel = Proxy

Make the HTTPFactory a listener on a port as per usual, and you have a fully-functioning web proxy!

Method Summary
| `__init__(self)` (inherited from `HTTPChannel`)
| `allContentReceived(self)` (inherited from `HTTPChannel`)
| `allHeadersReceived(self)` (inherited from `HTTPChannel`)
| ``checkPersistence`(self, request, version)` Check if the channel should close or not. (inherited from `HTTPChannel`)
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down. (inherited from `HTTPChannel`)
| ``dataReceived`(self, data)` Protocol.dataReceived. (inherited from `LineReceiver`)
| ``headerReceived`(self, line)` Do pre-processing (for content-length) and store this header away. (inherited from `HTTPChannel`)
| ``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. (inherited from `HTTPChannel`)
| ``rawDataReceived`(self, data)` Override this for when raw data is received. (inherited from `HTTPChannel`)
| ``requestDone`(self, request)` Called by first request in queue when it is done. (inherited from `HTTPChannel`)
| ``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
`class` | `ProxyRequest`

Class Variable Details

### ProxyRequest `ProxyRequest` = `twisted.web.proxy.ProxyRequest`

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