Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
restincurl::TlsLocker Class Reference

#include <restincurl.h>

Collaboration diagram for restincurl::TlsLocker:
Collaboration graph

Static Public Member Functions

static void tlsLOckInit ()
 
static void tlsLockKill ()
 

Static Private Member Functions

static void lock ()
 
static void unlock ()
 

Static Private Attributes

static std::mutex mutex_
 

Detailed Description

Thread support for the TLS layer used by libcurl.

Some TLS libraries require that you supply callback functions to deal with thread synchronization.

See https://curl.haxx.se/libcurl/c/threadsafe.html

You can deal with this yourself, or in the case that RESTinCurl support your TLS library, you can use this class.

Currently supported libraries:

  • Opeenssl (only required for OpenSSL <= 1.0.2) define RESTINCURL_WITH_OPENSSL_THREADS

The class is written so that you can use it in your code, and it will only do something when the appropriate define is set.

This class is only available when RESTINCURL_ENABLE_ASYNC is nonzero.

Definition at line 688 of file restincurl.h.

Member Function Documentation

◆ lock()

static void restincurl::TlsLocker::lock ( )
inlinestaticprivate

Definition at line 733 of file restincurl.h.

◆ tlsLOckInit()

static void restincurl::TlsLocker::tlsLOckInit ( )
inlinestatic

Enable the built-in support.

Definition at line 719 of file restincurl.h.

◆ tlsLockKill()

static void restincurl::TlsLocker::tlsLockKill ( )
inlinestatic

Free up resources used when finished using TLS.

Definition at line 724 of file restincurl.h.

◆ unlock()

static void restincurl::TlsLocker::unlock ( )
inlinestaticprivate

Definition at line 737 of file restincurl.h.

Member Data Documentation

◆ mutex_

std::mutex restincurl::TlsLocker::mutex_
staticprivate

Definition at line 741 of file restincurl.h.


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