Package Anomos :: Module Dispatcher :: Class Dispatcher
[hide private]
[frames] | no frames]

Class Dispatcher

source code

asyncore.dispatcher --+
                      |
                     Dispatcher
Known Subclasses:

This is an abstract class. You must derive from this class, and add the two methods collect_incoming_data() and found_terminator()

Instance Methods [hide private]
 
__init__(self, conn=None) source code
 
collect_incoming_data(self, data) source code
 
found_terminator(self) source code
 
recv(self, buffer_size) source code
 
set_terminator(self, term)
Set the input delimiter.
source code
 
get_terminator(self) source code
 
handle_read(self)
Essentially copied from asynchat.
source code
 
handle_write(self) source code
 
handle_close(self) source code
 
handle_expt(self) source code
 
handle_error(self) source code
 
push(self, data) source code
 
push_with_producer(self, producer) source code
 
readable(self)
predicate for inclusion in the readable for select()
source code
 
writable(self)
predicate for inclusion in the writable for select()
source code
 
close_when_done(self)
automatically close this channel once the outgoing queue is empty
source code
 
refill_buffer(self) source code
 
initiate_send(self) source code
 
discard_buffers(self) source code

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

Class Variables [hide private]
  ac_in_buffer_size = 4096
  ac_out_buffer_size = 4096

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

Method Details [hide private]

__init__(self, conn=None)
(Constructor)

source code 
Overrides: asyncore.dispatcher.__init__

recv(self, buffer_size)

source code 
Overrides: asyncore.dispatcher.recv

set_terminator(self, term)

source code 

Set the input delimiter. Can be a fixed string of any length, an integer, or None

handle_read(self)

source code 

Essentially copied from asynchat. Main differences are SSL friendly recv error handling, and the removal of some terminator cases which don't occur in Anomos

Overrides: asyncore.dispatcher.handle_read

handle_write(self)

source code 
Overrides: asyncore.dispatcher.handle_write

handle_close(self)

source code 
Overrides: asyncore.dispatcher.handle_close

handle_expt(self)

source code 
Overrides: asyncore.dispatcher.handle_expt

handle_error(self)

source code 
Overrides: asyncore.dispatcher.handle_error

readable(self)

source code 

predicate for inclusion in the readable for select()

Overrides: asyncore.dispatcher.readable

writable(self)

source code 

predicate for inclusion in the writable for select()

Overrides: asyncore.dispatcher.writable