'Makes a single request to the GRR server.
Returns:
A Status() object indicating how the last POST went.'

def RunOnce(self):

    if (not self._FetchServerCertificate()):
        self.timer.Wait()
        return HTTPObject(code=500)
    if (self.http_manager.consecutive_connection_errors == 0):
        message_list = self.client_worker.Drain(max_size=config.CONFIG['Client.max_post_size'])
    else:
        message_list = rdf_flows.MessageList()
    for message in message_list.job:
        if message.require_fastpoll:
            self.timer.FastPoll()
            break
    payload = rdf_flows.ClientCommunication()
    if self.client_worker.MemoryExceeded():
        logging.info('Memory    exceeded,    will    not    retrieve    jobs.')
        payload.queue_size = 1000000
    else:
        payload.queue_size = self.client_worker.InQueueSize()
    nonce = self.communicator.EncodeMessages(message_list, payload)
    payload_data = payload.SerializeToString()
    response = self.MakeRequest(payload_data)
    if ((response.code != 200) or (response.messages is None)):
        logging.info('%s:    Could    not    connect    to    server    at    %s,    status    %s', self.communicator.common_name, self.http_manager.active_base_url, response.code)
        self.server_certificate = None
        messages = list(message_list.job)
        for message in messages:
            message.priority = rdf_flows.GrrMessage.Priority.HIGH_PRIORITY
            message.require_fastpoll = False
            message.ttl -= 1
            if (message.ttl > 0):
                self.client_worker.QueueResponse(message, (rdf_flows.GrrMessage.Priority.HIGH_PRIORITY + 1))
            else:
                logging.info('Dropped    message    due    to    retransmissions.')
        return response
    if (response.nonce != nonce):
        logging.info('Nonce    not    matched.')
        response.code = 500
        return response
    if (response.source != self.communicator.server_name):
        logging.info('Received    a    message    not    from    the    server    %s,    expected    %s.', response.source, self.communicator.server_name)
        response.code = 500
        return response
    for message in response.messages:
        if message.require_fastpoll:
            self.timer.FastPoll()
            break
    self.client_worker.QueueMessages(response.messages)
    cn = self.communicator.common_name
    logging.info('%s:    Sending    %s(%s),    Received    %s    messages    in    %s    sec.    Sleeping    for    %s', cn, len(message_list), len(payload_data), len(response.messages), response.duration, self.timer.sleep_time)
    return response
