def register(self, message, host):
<EOL>cuuid = message["<STR_LIT>"]<EOL>if len(self.registry) > self.registration_limit:<EOL><INDENT>logger.warning("<STR_LIT>" % cuuid)<EOL>response = serialize_data({"<STR_LIT>": "<STR_LIT>"},<EOL>self.compression, encryption=False)<EOL>return response<EOL><DEDENT>data = {"<STR_LIT:host>": host[<NUM_LIT:0>], "<STR_LIT:port>": host[<NUM_LIT:1>], "<STR_LIT:time>": datetime.now()}<EOL>return_msg = {"<STR_LIT>": "<STR_LIT>"}<EOL>if "<STR_LIT>" in message and self.encryption:<EOL><INDENT>data["<STR_LIT>"] = PublicKey(message["<STR_LIT>"][<NUM_LIT:0>],<EOL>message["<STR_LIT>"][<NUM_LIT:1>])<EOL>self.encrypted_hosts[host] = cuuid<EOL>return_msg["<STR_LIT>"] = [self.encryption.n, self.encryption.e]<EOL><DEDENT>if cuuid in self.registry:<EOL><INDENT>for key in data:<EOL><INDENT>self.registry[cuuid][key]=data[key]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.registry[cuuid] = data<EOL>self.registry[cuuid]["<STR_LIT>"] = False<EOL><DEDENT>response = serialize_data(return_msg,<EOL>self.compression, encryption=False)<EOL>logger.debug("<STR_LIT>" % cuuid)<EOL>for (key, value) in self.registry.items():<EOL><INDENT>logger.debug("<STR_LIT>" % (str(cuuid), str(key), pformat(value)))<EOL><DEDENT>return response<EOL>
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.