Package ganeti :: Package http :: Module server :: Class _HttpServerToClientMessageWriter
[hide private]
[frames] | no frames]

Class _HttpServerToClientMessageWriter

source code


Writes an HTTP response to client.

Instance Methods [hide private]
 
__init__(self, sock, request_msg, response_msg, write_timeout)
Writes the response to the client.
source code
 
HasMessageBody(self)
Logic to detect whether response should contain a message body.
source code

Inherited from HttpMessageWriter (private): _FormatMessage, _PrepareMessage

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, request_msg, response_msg, write_timeout)
(Constructor)

source code 

Writes the response to the client.

Parameters:
  • sock (socket) - Target socket
  • request_msg (http.HttpMessage) - Request message, required to determine whether response may have a message body
  • response_msg (http.HttpMessage) - Response message
  • write_timeout (float) - Write timeout for socket
Overrides: object.__init__

HasMessageBody(self)

source code 

Logic to detect whether response should contain a message body.

Overrides: HttpMessageWriter.HasMessageBody