Class t.w.h.HTTPChannel(basic.LineReceiver, policies.TimeoutMixin):

Part of twisted.web.http View Source View In Hierarchy

Known subclasses: twisted.web.proxy.Proxy, twisted.web.proxy.ReverseProxy

A receiver for HTTP requests.
Instance Variables_transferDecoderNone or an instance of _ChunkedTransferEncoding if the request body uses the chunked Transfer-Encoding.

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
1280 Method __init__ Undocumented
1286 Method connectionMade Called when a connection is made.
1289 Method lineReceived Override this for when each line is received.
1341 Method headerReceived Do pre-processing (for content-length) and store this header away.
1373 Method allContentReceived Undocumented
1393 Method rawDataReceived Override this for when raw data is received.
1405 Method allHeadersReceived Undocumented
1412 Method checkPersistence Check if the channel should close or not.
1458 Method requestDone Called by first request in queue when it is done.
1473 Method timeoutConnection Called when the connection times out.
1477 Method connectionLost Called when the connection is shut down.
1336 Method _finishRequestBody Undocumented

Inherited from LineReceiver:

Line # Kind Name Docs
207 Method clearLineBuffer Clear buffered data.
211 Method dataReceived Protocol.dataReceived.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
273 Method sendLine Sends a line to the other end of the connection.
278 Method lineLengthExceeded Called when the maximum line length has been reached.

Inherited from BaseProtocol (via LineReceiver, Protocol):

Line # Kind Name Docs
341 Method makeConnection Make a connection to a transport and a server.

Inherited from _PauseableMixin (via LineReceiver):

Line # Kind Name Docs
172 Method pauseProducing Undocumented
176 Method resumeProducing Undocumented
181 Method stopProducing Undocumented

Inherited from TimeoutMixin:

Line # Kind Name Docs
593 Method callLater Undocumented
597 Method resetTimeout Reset the timeout count down
602 Method setTimeout Change the timeout period
623 Method __timedOut Undocumented
Line # Kind Name Docs
1280 Method __init__ Undocumented
1373 Method allContentReceived Undocumented
1405 Method allHeadersReceived Undocumented
593 Method callLater Undocumented
1412 Method checkPersistence Check if the channel should close or not.
207 Method clearLineBuffer Clear buffered data.
1477 Method connectionLost Called when the connection is shut down.
1286 Method connectionMade Called when a connection is made.
211 Method dataReceived Protocol.dataReceived.
1341 Method headerReceived Do pre-processing (for content-length) and store this header away.
278 Method lineLengthExceeded Called when the maximum line length has been reached.
1289 Method lineReceived Override this for when each line is received.
341 Method makeConnection Make a connection to a transport and a server.
172 Method pauseProducing Undocumented
1393 Method rawDataReceived Override this for when raw data is received.
1458 Method requestDone Called by first request in queue when it is done.
597 Method resetTimeout Reset the timeout count down
176 Method resumeProducing Undocumented
273 Method sendLine Sends a line to the other end of the connection.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
602 Method setTimeout Change the timeout period
181 Method stopProducing Undocumented
1473 Method timeoutConnection Called when the connection times out.
623 Method __timedOut Undocumented
1336 Method _finishRequestBody Undocumented
def __init__(self): (source)
Undocumented
def connectionMade(self): (source)

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.
def lineReceived(self, line): (source)
Override this for when each line is received.
def _finishRequestBody(self, data): (source)
Undocumented
def headerReceived(self, line): (source)
Do pre-processing (for content-length) and store this header away. Enforce the per-request header limit.
ParameterslineA line from the header section of a request, excluding the line delimiter. (type: str )
def allContentReceived(self): (source)
Undocumented
def rawDataReceived(self, data): (source)
Override this for when raw data is received.
def allHeadersReceived(self): (source)
Undocumented
def checkPersistence(self, request, version): (source)
Check if the channel should close or not.
ParametersrequestThe request most recently received over this channel against which checks will be made to determine if this connection can remain open after a matching response is returned.
versionThe version of the request. (type: str )
ReturnsA flag which, if True, indicates that this connection may remain open to receive another request; if False, the connection must be closed in order to indicate the completion of the response to request. (type: bool )
def requestDone(self, request): (source)
Called by first request in queue when it is done.
def timeoutConnection(self): (source)
Called when the connection times out. Override to define behavior other than dropping the connection.
def connectionLost(self, reason): (source)

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.
Parametersreason (type: twisted.python.failure.Failure )
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.