Package ganeti :: Module daemon :: Class AsyncStreamServer
[hide private]
[frames] | no frames]

Class AsyncStreamServer

source code


A stream server to use with asyncore.

Each request is accepted, and then dispatched to a separate asyncore dispatcher to handle.

Instance Methods [hide private]
 
__init__(self, family, address)
Constructor for AsyncUnixStreamSocket
source code
 
handle_accept(self)
Accept a new client connection.
source code
 
handle_connection(self, connected_socket, client_address)
Handle an already accepted connection.
source code

Inherited from GanetiBaseAsyncoreDispatcher: handle_error, writable

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

Class Variables [hide private]
  _REQUEST_QUEUE_SIZE = 5

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

Method Details [hide private]

__init__(self, family, address)
(Constructor)

source code 

Constructor for AsyncUnixStreamSocket

Parameters:
  • family (integer) - socket family (one of socket.AF_*)
  • address (address family dependent) - address to bind the socket to
Overrides: asyncore.dispatcher.__init__

handle_accept(self)

source code 

Accept a new client connection.

Creates a new instance of the handler class, which will use asyncore to serve the client.

Overrides: asyncore.dispatcher.handle_accept