def process_message(self, message, connection):
        """Processes given message connection pair"""
        # find method and invoke it holding a lock
        mname = "msg_%s" % msg_names[message.type].lower()
        try:
            method = getattr(self, mname)
            if self.debug: self.logger.write("State", "invoking method: %s" % mname)
        except AttributeError:
            if self.debug: self.logger.write("Method Error", "method not supported: %s" % mname)
            return False
        with self.lock:
            method(connection, message)
        return True

    # message handlers
dataset/ETHPy150Open denizalti/concoord/concoord/node.py/Node.process_message/original