Atlas  0.7.0
Networking protocol for the Worldforge system.
atlas.transport.bridge.Bridge Class Reference

Public Member Functions

def __init__ (self, negotiation=NegotiationClient, store_operations=1, functions=None)
 
def send_string (self, data)
 
def operation_received (self, op)
 
def connection_ok (self)
 
def log (self, type, data)
 
def setup (self)
 
def close (self)
 
def process_string (self, data)
 
def process_operation (self, op=None)
 
def internal_send_string (self, data)
 
def decode_string (self, data)
 

Public Attributes

 codec
 
 negotiation
 
 store_operations
 
 operations_to_send
 
 send_string
 
 operation_received
 
 connection_ok
 
 log
 

Detailed Description

includes negotiation at start and codecs when sending/receiving
   translation from Object to string: return string to be transmitted
      (or at begin negotiation strings)
   transltaion from string to Object: return Object received
      (or at begin nothing until negotiation done)
   raise bridge error on negotiation (TODO: or syntax error in encoding)
   operations send before codec if negotiated is either stored to queue or discarded

   Usage: replace send_string, operation_received, connection_ok, log
          with your own functions/methods
   Process incoming strings with process_string method:
          returns string to send, operations received
          (also calls 'Usage: methods' as needed)
   Process outgoing operations with process_operation:
          returns string to send
          (also calls 'Usage: methods' as needed)

Definition at line 28 of file bridge.py.

Member Function Documentation

◆ connection_ok()

def atlas.transport.bridge.Bridge.connection_ok (   self)
this is called after negotiation is done

Definition at line 72 of file bridge.py.

Referenced by atlas.transport.bridge.Bridge.log().

◆ log()

◆ operation_received()

def atlas.transport.bridge.Bridge.operation_received (   self,
  op 
)
this is called for eac decoded operation

Definition at line 67 of file bridge.py.

Referenced by atlas.transport.bridge.Bridge.log().

◆ send_string()

def atlas.transport.bridge.Bridge.send_string (   self,
  data 
)
send string using transport specific method: specify your own

Definition at line 62 of file bridge.py.

Referenced by atlas.transport.bridge.Bridge.log().


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