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))
def __executeFunction(self): try: return True, self.method(*self.args) except Exception as e: log.exception("Error calling hub function") return False, getUnicode(e)
def on_message(self, message): log.debug("Message received from ID: %s\n%s " % (getUnicode(self.ID), getUnicode(message))) self._commHandler.onAsyncMessage(message)