Class e.p.h.e.c.HTTPChannel(basic.LineReceiver, policies.TimeoutMixin, object):

Part of elisa.plugins.http_client.extern.channel_http View In Hierarchy

Implements interfaces: twisted.internet.interfaces.IHalfCloseableProtocol

A receiver for HTTP requests. Handles splitting up the connection for the multiple HTTPChannelRequests that may be in progress on this channel.
Instance VariablestimeOutnumber of seconds to wait before terminating an idle connection.
maxPipelinenumber of outstanding in-progress requests to allow before pausing the input.
maxHeaderLengthnumber of bytes of header to accept from the client.
Line # Kind Name Docs
664 Method __init__ Undocumented
668 Method connectionMade Undocumented
672 Method lineReceived Undocumented
705 Method lineLengthExceeded Undocumented
717 Method rawDataReceived Undocumented
724 Method requestReadFinished Undocumented
761 Method setReadPersistent Undocumented
766 Method dropQueuedRequests Called when a response is written that forces a connection close.
774 Method isLastRequest Undocumented
778 Method requestWriteFinished Called by first request in queue when it is done.
794 Method timeoutConnection Undocumented
798 Method lingeringClose This is a bit complicated. This process is necessary to ensure proper
827 Method writeConnectionLost Undocumented
837 Method readConnectionLost Read connection lost
858 Method connectionLost Undocumented
661 Method _callLater Undocumented
739 Method _startNextRequest Undocumented
833 Method _lingerClose Undocumented
def _callLater(self, secs, fun):
Undocumented
def __init__(self):
Undocumented
def connectionMade(self):
Undocumented
def lineReceived(self, line):
Undocumented
def lineLengthExceeded(self, line):
Undocumented
def rawDataReceived(self, data):
Undocumented
def requestReadFinished(self, request):
Undocumented
def _startNextRequest(self):
Undocumented
def setReadPersistent(self, persistent):
Undocumented
def dropQueuedRequests(self):
Called when a response is written that forces a connection close.
def isLastRequest(self, request):
Undocumented
def requestWriteFinished(self, request):
Called by first request in queue when it is done.
def timeoutConnection(self):
Undocumented
def lingeringClose(self):

This is a bit complicated. This process is necessary to ensure proper workingness when HTTP pipelining is in use.

Here is what it wants to do:

  1. Finish writing any buffered data, then close our write side. While doing so, read and discard any incoming data.
  2. When that happens (writeConnectionLost called), wait up to 20 seconds for the remote end to close their write side (our read side).
    • If they do (readConnectionLost called), close the socket, and cancel the timeout.
    • If that doesn't happen, the timer fires, and makes the socket close anyways.
def writeConnectionLost(self):
Undocumented
def _lingerClose(self):
Undocumented
def readConnectionLost(self):
Read connection lost
def connectionLost(self, reason):
Undocumented
API Documentation for Elisa Media Center, generated by pydoctor at 2009-02-16 19:15:05.