'Initiate a conversation for handling data store commands.'

def HandleDataStoreService(self):

    if self.data_server:
        self._EmptyResponse(constants.RESPONSE_NOT_A_CLIENT)
        return
    sock = self.connection
    sock.setblocking(1)
    token = rdf_data_server.DataStoreAuthToken.FromSerializedString(self.post_data)
    perms = self.NONCE_STORE.ValidateAuthTokenClient(token)
    if (not perms):
        sock.sendall('IP\n')
        sock.close()
        self.close_connection = 1
        return
    logging.info('Client    %s    has    started    using    the    data    server', self.client_address)
    try:
        sock.settimeout(self.LOGIN_TIMEOUT)
        sock.sendall('OK\n')
    except (socket.error, socket.timeout):
        logging.warning('Could    not    login    client    %s', self.client_address)
        self.close_connection = 1
        return
    while True:
        replybody = self.HandleClient(sock, perms)
        if (not replybody):
            sock.close()
            self.close_connection = 1
            return
        try:
            sock.settimeout(self.SEND_TIMEOUT)
            sock.sendall(replybody)
        except (socket.error, socket.timeout):
            sock.close()
            self.close_connection = 1
            return
