3rd party libraries startup/shutdown functions


Introduction

Support functions to initialize/set and deinitialize/unset required 3rd party libraries used by the DCA.

Note:
The code snippets in dca_callbacks.cpp are simply samples that show how to set up libcurl and OpenSSL to use them in a multi-threaded environment. If you already initialize the two libraries in your application code you will not need to use these functions.

You must call the init/set functions before using any DCA function or class, and it is recommended that you call the deinit/unset functions at shutdown to cleanup global variables and other resources.

See also:
Initialization of 3rd party libraries

Functions

void dca::InitCUrl ()
 Initializes libcurl. Do not use any DCA function before initializing libcurl.
void dca::DeinitCUrl ()
 Deinitializes libcurl. Do not call any DCA function after you have called this function.
void dca::SetOpenSslCallbacks ()
 Initializes the required callbacks for OpenSSL when using HTTPS or SSL connections in a multi-threaded environment. The DCA requires these callbacks to be set up. Do not call any DCA function before setting up the openssl callbacks.
void dca::UnsetOpenSslCallbacks ()
 Unsets the openssl callbacks. Do not call any DCA function after you have called this function.

Function Documentation

void dca::InitCUrl (  ) 

Initializes libcurl. Do not use any DCA function before initializing libcurl.

libcurl requires that internal global variables are set up before use. Calling this support function ensures that the DCA can use the libcurl functions internally.

See also:
DeinitCUrl(), Initialization of 3rd party libraries
void dca::DeinitCUrl (  ) 

Deinitializes libcurl. Do not call any DCA function after you have called this function.

This is the counterpart of the InitCUrl() function, and frees up the global variables used internally by libcurl.

See also:
InitCUrl(), Initialization of 3rd party libraries
void dca::SetOpenSslCallbacks (  ) 

Initializes the required callbacks for OpenSSL when using HTTPS or SSL connections in a multi-threaded environment. The DCA requires these callbacks to be set up. Do not call any DCA function before setting up the openssl callbacks.

The provided openssl support function SetOpenSslCallbacks() works with pthread and NTPL based threading models.

These callbacks are required to enable the openssl library to identify resouces for its owned thread.

See also:
UnsetOpenSslCallbacks(), Initialization of 3rd party libraries
void dca::UnsetOpenSslCallbacks (  ) 

Unsets the openssl callbacks. Do not call any DCA function after you have called this function.

After calling this function multithreaded SSL and HTTPS connection functions may not work properly anymore.

See also:
SetOpenSslCallbacks(), Initialization of 3rd party libraries

Generated on 26 Sep 2016 for dca_interface by  doxygen 1.6.1