Processes messages that have been delivered from the listener.

        Args:
          msg (string): The raw packet data delivered from the listener. This
            data will be unserialized and then processed based on the packet's
            method.
          host (tuple): The (address, host) tuple of the source message.

        Returns:
          A response that will be sent back to the client via the listener.

def handle_message(self, msg, host):
        """Processes messages that have been delivered from the listener.

        Args:
          msg (string): The raw packet data delivered from the listener. This
            data will be unserialized and then processed based on the packet's
            method.
          host (tuple): The (address, host) tuple of the source message.

        Returns:
          A response that will be sent back to the client via the listener.

        """

        response = None

        # Unserialize the packet, and decrypt if the host has encryption enabled
        if host in self.encrypted_hosts:
            msg_data = unserialize_data(msg, self.compression, self.encryption)
        else:
            msg_data = unserialize_data(msg, self.compression)

        logger.debug("Packet received: " + pformat(msg_data))

        # If the message data is blank, return none
        if not msg_data: return response

        # For debug purposes, check if the client is registered or not
        if self.is_registered(msg_data["cuuid"], host[0]):
            logger.debug("<%s> Client is currently registered" % msg_data["cuuid"])
        else:
            logger.debug("<%s> Client is not registered"  % msg_data["cuuid"])

        if "method" in msg_data:
            if msg_data["method"] == "REGISTER":
                logger.debug("<%s> Register packet received" % msg_data["cuuid"])
                response = self.register(msg_data, host)

            elif msg_data["method"] == "OHAI":
                if not self.discoverable:
                    return False
                logger.debug("<%s> Autodiscover packet received" % msg_data["cuuid"])
                response = self.autodiscover(msg_data)

            elif msg_data["method"] == "AUTH":
                logger.debug("<%s> Authentication packet recieved" % msg_data["cuuid"])
                response = self.auth_server.verify_login(msg_data)
                if response:
                    self.registry[host]["authenticated"] = True

            else:
                if self.auth_server:
                    if self.registry[host]["authenticated"]:
                        response = self.handle_message_registered(msg_data, host)
                else:
                    response = self.handle_message_registered(msg_data, host)

        logger.debug("Packet processing completed")
        return response