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

Class AsyncUDPSocket

source code


An improved asyncore udp socket.

Instance Methods [hide private]
 
__init__(self, family)
Constructor for AsyncUDPSocket
source code
 
handle_connect(self) source code
 
handle_read(self) source code
 
handle_datagram(self, payload, ip, port)
Handle an already read udp datagram
source code
 
writable(self)
Most of the time we don't want to check for writability.
source code
 
handle_write(self) source code
 
enqueue_send(self, ip, port, payload)
Enqueue a datagram to be sent when possible
source code
boolean
process_next_packet(self, timeout=0)
Process the next datagram, waiting for it if necessary.
source code

Inherited from GanetiBaseAsyncoreDispatcher: handle_error

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

Class Variables [hide private]

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

Method Details [hide private]

__init__(self, family)
(Constructor)

source code 

Constructor for AsyncUDPSocket

Overrides: asyncore.dispatcher.__init__

handle_connect(self)

source code 
Overrides: asyncore.dispatcher.handle_connect

handle_read(self)

source code 
Overrides: asyncore.dispatcher.handle_read

writable(self)

source code 

Most of the time we don't want to check for writability.

Overrides: asyncore.dispatcher.writable

handle_write(self)

source code 
Overrides: asyncore.dispatcher.handle_write

process_next_packet(self, timeout=0)

source code 

Process the next datagram, waiting for it if necessary.

Parameters:
  • timeout (float) - how long to wait for data
Returns: boolean
True if some data has been handled, False otherwise