Slimline fork of https://github.com/SpectrumIM/spectrum2, with lots of things cleaned up and improved
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
512 B

#pragma once
#include "curl/curl.h"
#include "transport/Logging.h"
#include "transport/ThreadPool.h"
#include <iostream>
#include <sstream>
#include <string.h>
#include "rapidjson/document.h"
namespace Transport {
class HTTPRequest;
class HTTPRequestQueue {
public:
HTTPRequestQueue(int delayBetweenRequests = 1);
virtual ~HTTPRequestQueue();
void queueRequest(HTTPRequest *req);
void sendNextRequest();
private:
int m_delay;
std::queue<HTTPRequest *> m_queue;
bool m_processing;
};
}