Package ivy :: Module ivy :: Class IvyHandler
[hide private]
[frames] | no frames]

Class IvyHandler

source code

SocketServer.BaseRequestHandler --+    
                                  |    
  SocketServer.StreamRequestHandler --+
                                      |
                                     IvyHandler

An IvyHandler is associated to one IvyClient connected to our server.

It runs into a dedicate thread as long as the remote client is connected to us.

It is in charge of examining all messages that are received and to take any appropriate actions.

Implementation note: the IvyServer is accessible in self.server

Instance Methods [hide private]
 
handle(self) source code
 
process_ivymessage(self, msg, client)
Examines the message (after passing it through the decode_msg() filter) and takes the appropriate actions depending on the message types.
source code

Inherited from SocketServer.StreamRequestHandler: finish, setup

Inherited from SocketServer.BaseRequestHandler: __init__

Class Variables [hide private]

Inherited from SocketServer.StreamRequestHandler: rbufsize, wbufsize

Method Details [hide private]

handle(self)

source code 
Overrides: SocketServer.BaseRequestHandler.handle

process_ivymessage(self, msg, client)

source code 
Examines the message (after passing it through the decode_msg() filter) and takes the appropriate actions depending on the message types. Please refer to the document The Ivy Architecture and Protocol and to the python code for further details.
Parameters:
  • msg - : (should not include a newline at end)
Returns:
False if the connection should be terminated, True otherwise