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

Class HTTPChannel

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

Known Subclasses:
ReverseProxy, Proxy

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. (inherited from Protocol)
  connectionMade(self)
Called when a connection is made. (inherited from BaseProtocol)
  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.
  makeConnection(self, transport)
Make a connection to a transport and a server. (inherited from BaseProtocol)
  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
None _HTTPChannel__content
int _HTTPChannel__first_line
string _HTTPChannel__header

Method Details

checkPersistence(self, request, version)

Check if the channel should close or not.

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

_HTTPChannel__content

Type:
None
Value:
None                                                                   

_HTTPChannel__first_line

Type:
int
Value:
1                                                                      

_HTTPChannel__header

Type:
string
Value:
''                                                                     

Generated by Epydoc 1.1 on Sat Feb 15 21:19:12 2003 http://epydoc.sf.net