Пример #1
0
 def open(self, *args):
     try:
         id = int(args[0])
     except:
         id = None
     self.ID = self._commHandler.onOpen(id)
     log.debug("open new connection with ID: %s " % getUnicode(self.ID))
Пример #2
0
 def __executeFunction(self):
     try:
         return True, self.method(*self.args)
     except Exception as e:
         log.exception("Error calling hub function")
         return False, getUnicode(e)
Пример #3
0
 def on_message(self, message):
     log.debug("Message received from ID: %s\n%s " % (getUnicode(self.ID), getUnicode(message)))
     self._commHandler.onAsyncMessage(message)