Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
dispatcher_with_send Class Reference
Inheritance diagram for dispatcher_with_send:
dispatcher

Public Member Functions

def __init__
 
def initiate_send
 
def handle_write
 
def writable
 
def send
 
- Public Member Functions inherited from dispatcher
def __init__
 
def __repr__
 
def add_channel
 
def del_channel
 
def create_socket
 
def set_socket
 

Data Fields

 out_buffer
 
- Data Fields inherited from dispatcher
 connected
 
 socket
 
 family_and_type
 

Additional Inherited Members

- Static Public Attributes inherited from dispatcher
int debug = 0
 
int connected = 0
 
int accepting = 0
 
int closing = 0
 
 addr = None
 

Detailed Description

Definition at line 448 of file asyncore.py.

Constructor & Destructor Documentation

def __init__ (   self,
  sock = None 
)

Definition at line 449 of file asyncore.py.

450  def __init__ (self, sock=None):
451  dispatcher.__init__ (self, sock)
452  self.out_buffer = ''

Member Function Documentation

def handle_write (   self)

Definition at line 458 of file asyncore.py.

References async_chat.initiate_send(), and dispatcher_with_send.initiate_send().

459  def handle_write (self):
460  self.initiate_send()
def initiate_send (   self)

Definition at line 453 of file asyncore.py.

References dispatcher_with_send.out_buffer.

454  def initiate_send (self):
455  num_sent = 0
456  num_sent = dispatcher.send (self, self.out_buffer[:512])
457  self.out_buffer = self.out_buffer[num_sent:]
def send (   self,
  data 
)

Definition at line 464 of file asyncore.py.

References dispatcher.debug, async_chat.initiate_send(), dispatcher_with_send.initiate_send(), and dispatcher_with_send.out_buffer.

465  def send (self, data):
466  if self.debug:
467  self.log_info ('sending %s' % repr(data))
468  self.out_buffer = self.out_buffer + data
469  self.initiate_send()
470 
471 # ---------------------------------------------------------------------------
472 # used for debugging.
473 # ---------------------------------------------------------------------------
def writable (   self)

Definition at line 461 of file asyncore.py.

References dispatcher.connected, and dispatcher_with_send.out_buffer.

462  def writable (self):
463  return (not self.connected) or len(self.out_buffer)

Field Documentation

out_buffer

Definition at line 451 of file asyncore.py.


The documentation for this class was generated from the following file: