Package ganeti :: Package server :: Module masterd :: Class MasterClientHandler
[hide private]
[frames] | no frames]

Class MasterClientHandler

source code


Handler for master peers.

Instance Methods [hide private]
 
__init__(self, server, connected_socket, client_address, family)
AsyncTerminatedMessageStream constructor.
source code
 
handle_message(self, message, _)
Handle a terminated message.
source code

Inherited from daemon.AsyncTerminatedMessageStream: close_log, collect_incoming_data, found_terminator, handle_error, handle_expt, handle_write, readable, send_message, writable

Inherited from asynchat.async_chat: close_when_done, discard_buffers, get_terminator, handle_close, handle_read, initiate_send, push, push_with_producer, set_terminator

Inherited from asynchat.async_chat (private): _collect_incoming_data, _get_data

Inherited from asyncore.dispatcher: __getattr__, __repr__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_accept, handle_connect, handle_connect_event, handle_expt_event, handle_read_event, handle_write_event, listen, log, log_info, recv, send, set_reuse_addr, set_socket

Class Variables [hide private]
  _MAX_UNHANDLED = 1

Inherited from asynchat.async_chat: ac_in_buffer_size, ac_out_buffer_size

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Method Details [hide private]

__init__(self, server, connected_socket, client_address, family)
(Constructor)

source code 

AsyncTerminatedMessageStream constructor.

Parameters:
  • connected_socket - connected stream socket to receive messages from
  • peer_address - family-specific peer address
  • terminator - terminator separating messages in the stream
  • family - socket family
  • unhandled_limit - maximum unanswered messages
Overrides: asyncore.dispatcher.__init__

handle_message(self, message, _)

source code 

Handle a terminated message.

Parameters:
  • message - message to handle
  • message_id - stream's message sequence number
Overrides: daemon.AsyncTerminatedMessageStream.handle_message
(inherited documentation)