MCPcopy Create free account
hub / github.com/RetroShare/RetroShare / CURLWrapper

Method CURLWrapper

plugins/FeedReader/util/CURLWrapper.cpp:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#define USERAGENT "Mozilla/5.0 (rv:109.0) Gecko/20100101 Firefox/112.0"
25
26CURLWrapper::CURLWrapper(const std::string &proxy)
27{
28 mCurl = curl_easy_init();
29 if (mCurl) {
30 curl_easy_setopt(mCurl, CURLOPT_NOPROGRESS, 0);
31// curl_easy_setopt(mCurl, CURLOPT_PROGRESSFUNCTION, progressCallback);
32// curl_easy_setopt(mCurl, CURLOPT_PROGRESSDATA, feedReader);
33 curl_easy_setopt(mCurl, CURLOPT_FOLLOWLOCATION, 1);
34 curl_easy_setopt(mCurl, CURLOPT_CONNECTTIMEOUT, 60);
35 curl_easy_setopt(mCurl, CURLOPT_TIMEOUT, 120);
36
37 if (!proxy.empty()) {
38 curl_easy_setopt(mCurl, CURLOPT_PROXY, proxy.c_str());
39 }
40 }
41}
42
43CURLWrapper::~CURLWrapper()
44{

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected