Package elisa :: Package plugins :: Package http_client :: Package extern :: Module client_http :: Class HTTPClientProtocol

Class HTTPClientProtocol

source code


A HTTP 1.1 Client with request pipelining support.

Instance Methods
 
__init__(self, manager=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
lineReceived(self, line)
Override this for when each line is received.
source code
 
rawDataReceived(self, data)
Override this for when raw data is received.
source code
twisted.internet.defer.Deferred
submitRequest(self, request, closeAfter=True)
Returns: A Deferred which will be called back with the twisted.web2.http.Response from the server.
source code
 
requestWriteFinished(self, request) source code
 
requestReadFinished(self, request) source code
 
setReadPersistent(self, persist) source code
 
connectionLost(self, reason)
Called when the connection is shut down.
source code

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

Inherited from twisted.internet.protocol.BaseProtocol: connectionMade, makeConnection

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

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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  chanRequest = None
hash(x)
  maxHeaderLength = 10240
  firstLine = 1
  readPersistent = PERSIST_NO_PIPELINE
  inputTimeOut = 60* 4

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

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Inherited from twisted.protocols.basic._PauseableMixin: paused

Inherited from twisted.protocols.policies.TimeoutMixin: timeOut

Properties

Inherited from object: __class__

Method Details

__init__(self, manager=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • manager (IHTTPClientManager) - The object this client reports it state to.
Overrides: object.__init__

lineReceived(self, line)

source code 

Override this for when each line is received.

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

rawDataReceived(self, data)

source code 

Override this for when raw data is received.

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

submitRequest(self, request, closeAfter=True)

source code 
Parameters:
  • request (ClientRequest) - The request to send to a remote server.
  • closeAfter (bool) - If True the 'Connection: close' header will be sent, otherwise 'Connection: keep-alive'
Returns: twisted.internet.defer.Deferred
A Deferred which will be called back with the twisted.web2.http.Response from the server.

connectionLost(self, reason)

source code 

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: twisted.internet.protocol.Protocol.connectionLost
(inherited documentation)