Package ganeti :: Package http :: Class HttpMessageWriter
[hide private]
[frames] | no frames]

Class HttpMessageWriter

source code


Writes an HTTP message to a socket.

Instance Methods [hide private]
 
__init__(self, sock, msg, write_timeout)
Initializes this class and writes an HTTP message to a socket.
source code
 
_PrepareMessage(self)
Prepares the HTTP message by setting mandatory headers.
source code
 
_FormatMessage(self)
Serializes the HTTP message into a string.
source code
 
HasMessageBody(self)
Checks whether the HTTP message contains a body.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sock, msg, write_timeout)
(Constructor)

source code 

Initializes this class and writes an HTTP message to a socket.

Parameters:
  • sock (socket) - Socket to be written to
  • msg (http.HttpMessage) - HTTP message to be written
  • write_timeout (float) - Write timeout for socket
Overrides: object.__init__

HasMessageBody(self)

source code 

Checks whether the HTTP message contains a body.

Can be overridden by subclasses.