25#define _HandlePool_h 1
51 std::shared_ptr<http::url> d_url;
53 char d_errbuf[CURL_ERROR_SIZE];
55 curl_slist *d_request_headers;
81 unsigned int d_max_easy_handles;
82 std::vector<dmrpp_easy_handle *> d_easy_handles;
83 std::recursive_mutex d_get_easy_handle_mutex;
93 for (
auto i = d_easy_handles.begin(), e = d_easy_handles.end(); i != e; ++i) {
100 {
return d_max_easy_handles; }
102 unsigned int get_handles_available()
const
105 for (
auto i = d_easy_handles.begin(), e = d_easy_handles.end(); i != e; ++i) {
106 if (!(*i)->d_in_use) {
void release_handle(dmrpp_easy_handle *h)
unsigned int get_max_handles() const
Get the number of handles in the pool.
void release_all_handles()
dmrpp_easy_handle * get_easy_handle(Chunk *chunk)
Bundle a libcurl easy handle with other information.
void read_data()
This is the read_data() method for all transfers.
dmrpp_easy_handle()
Build a string with hex info about stuff libcurl gets.