def register(self, message, host):
        """This function will register a particular client in the server's
        registry dictionary.

        Any clients that are registered will be able to send and recieve events
        to and from the server.

        Args:
          message (dict): The client message from the client who wants to
            register.
          host (tuple): The (address, port) tuple of the client that is
            registering.

        Returns:
          A server response with an "OK REGISTER" if the registration was
          successful or a "BYE REGISTER" if unsuccessful.

        """
        # Get the client generated cuuid from the register message
        cuuid = message["cuuid"]

        # Check to see if we've hit the maximum number of registrations
        # If we've reached the maximum limit, return a failure response to the
        # client.
        if len(self.registry) > self.registration_limit:
            logger.warning("<%s> Registration limit exceeded" % cuuid)
            response = serialize_data({"method": "BYE REGISTER"},
                                      self.compression, encryption=False)

            return response

        # Insert a new record in the database with the client's information
        data = {"host": host[0], "port": host[1], "time": datetime.now()}

        # Prepare an OK REGISTER response to the client to let it know that it
        # has registered
        return_msg = {"method": "OK REGISTER"}

        # If the register request has a public key included in it, then include
        # it in the registry.
        if "encryption" in message and self.encryption:
            data["encryption"] = PublicKey(message["encryption"][0],
                                           message["encryption"][1])

            # Add the host to the encrypted_hosts dictionary so we know to
            # decrypt messages from this host
            self.encrypted_hosts[host] = cuuid

            # If the client requested encryption and we have it enabled, send
            # our public key to the client
            return_msg["encryption"] = [self.encryption.n, self.encryption.e]

        # Add the entry to the registry
        if cuuid in self.registry:
            for key in data:
                self.registry[cuuid][key]=data[key]
        else:
            self.registry[cuuid] = data
            self.registry[cuuid]["authenticated"] = False

        # Serialize our response to the client
        response = serialize_data(return_msg,
                                  self.compression, encryption=False)

         # For debugging, print all the current rows in the registry
        logger.debug("<%s> Registry entries:" % cuuid)

        for (key, value) in self.registry.items():
            logger.debug("<%s> %s %s" % (str(cuuid), str(key), pformat(value)))

        return response
This function will register a particular client in the server's
        registry dictionary.

        Any clients that are registered will be able to send and recieve events
        to and from the server.

        Args:
          message (dict): The client message from the client who wants to
            register.
          host (tuple): The (address, port) tuple of the client that is
            registering.

        Returns:
          A server response with an "OK REGISTER" if the registration was
          successful or a "BYE REGISTER" if unsuccessful.