cpp-ipfs-http-client: ipfs::http::CurlGlobal Class Reference

cpp-ipfs-http-client IPFS C++ client library

Public Member Functions | Public Attributes | List of all members
ipfs::http::CurlGlobal Class Reference

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...

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ CurlGlobal()

ipfs::http::CurlGlobal::CurlGlobal | ( |  | ) |

Constructor that calls curl_global_init().

## ◆ ~CurlGlobal()

ipfs::http::CurlGlobal::~CurlGlobal | ( |  | ) |

Destructor that calls curl_global_cleanup().

## Member Data Documentation

## ◆ result_

CURLcode ipfs::http::CurlGlobal::result_

The result from curl_global_init() for checking the outcome later.

The documentation for this class was generated from the following file:

- src/http/transport-curl.cc