cpp-ipfs-http-client
IPFS C++ client library
|
CURL global initialization. More...
Public Member Functions | |
CurlGlobal () | |
Constructor that calls curl_global_init(). More... | |
~CurlGlobal () | |
Destructor that calls curl_global_cleanup(). More... | |
Public Attributes | |
CURLcode | result_ |
The result from curl_global_init() for checking the outcome later. More... | |
CURL global initialization.
curl_global_init()
needs to be called before any other threads have started executing because it is not thread safe and may call other non-thread safe functions. Thus we use a global variable and call curl_global_init()
in its constructor.
ipfs::http::CurlGlobal::CurlGlobal | ( | ) |
Constructor that calls curl_global_init().
ipfs::http::CurlGlobal::~CurlGlobal | ( | ) |
Destructor that calls curl_global_cleanup().
CURLcode ipfs::http::CurlGlobal::result_ |
The result from curl_global_init() for checking the outcome later.