twisted :: web :: http :: HTTPChannel :: Class HTTPChannel
[hide private]

Class HTTPChannel

internet.protocol.BaseProtocol --+        
                                 |        
        internet.protocol.Protocol --+    
                                     |    
   protocols.basic._PauseableMixin --+    
                                     |    
          protocols.basic.LineReceiver --+
                                         |
       protocols.policies.TimeoutMixin --+
                                         |
                                        HTTPChannel
Known Subclasses:

A receiver for HTTP requests.

Nested Classes [hide private]
  requestFactory
A HTTP request.
Instance Methods [hide private]
 
__init__(self)
 
allContentReceived(self)
 
allHeadersReceived(self)
 
checkPersistence(self, request, version)
Check if the channel should close or not.
 
connectionLost(self, reason)
Called when the connection is shut down.
 
connectionMade(self)
Called when a connection is made.
 
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.
 
rawDataReceived(self, data)
Override this for when raw data is received.
 
requestDone(self, request)
Called by first request in queue when it is done.
 
timeoutConnection(self)
Called when the connection times out.

Inherited from protocols.basic.LineReceiver: clearLineBuffer, dataReceived, lineLengthExceeded, sendLine, setLineMode, setRawMode

Inherited from internet.protocol.BaseProtocol: __providedBy__, makeConnection

Inherited from protocols.basic._PauseableMixin: pauseProducing, resumeProducing, stopProducing

Inherited from protocols.policies.TimeoutMixin: callLater, resetTimeout, setTimeout

Class Variables [hide private]
  __content = None
  __first_line = 1
  __header = ''
  _savedTimeOut = None
  length = 0
  maxHeaders = 500
  persistent = 1

Inherited from protocols.basic.LineReceiver: MAX_LENGTH, delimiter, line_mode

Inherited from internet.protocol.Protocol: __implemented__, __provides__

Inherited from internet.protocol.BaseProtocol: connected, transport

Inherited from protocols.basic._PauseableMixin: paused

Inherited from protocols.policies.TimeoutMixin: timeOut

Method Details [hide private]

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.

Overrides: internet.protocol.Protocol.connectionLost
(inherited documentation)

connectionMade(self)

 

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

Overrides: internet.protocol.BaseProtocol.connectionMade
(inherited documentation)

lineReceived(self, line)

 

Override this for when each line is received.

Overrides: protocols.basic.LineReceiver.lineReceived
(inherited documentation)

rawDataReceived(self, data)

 

Override this for when raw data is received.

Overrides: protocols.basic.LineReceiver.rawDataReceived
(inherited documentation)

timeoutConnection(self)

 

Called when the connection times out. Override to define behavior other than dropping the connection.

Overrides: protocols.policies.TimeoutMixin.timeoutConnection
(inherited documentation)