AWS SDK for C++  0.14.3
AWS SDK for C++
Public Member Functions | List of all members
Aws::Http::CurlHandleContainer Class Reference

#include <CurlHandleContainer.h>

Public Member Functions

 CurlHandleContainer (unsigned maxSize=50, long requestTimeout=3000, long connectTimeout=1000)
 
 ~CurlHandleContainer ()
 
CURL * AcquireCurlHandle ()
 
void ReleaseCurlHandle (CURL *handle)
 

Detailed Description

Simple Connection pool manager for Curl. It maintains connections in a thread safe manner. You can call into acquire a handle, then put it back when finished. It is assumed that reusing an already initialized handle is preferable (especially for synchronous clients). The pool doubles in capacity as needed up to the maximum amount of connections.

Definition at line 36 of file CurlHandleContainer.h.

Constructor & Destructor Documentation

Aws::Http::CurlHandleContainer::CurlHandleContainer ( unsigned  maxSize = 50,
long  requestTimeout = 3000,
long  connectTimeout = 1000 
)

Initializes an empty stack of CURL handles. If you are only making synchronous calls via your http client then a small size is best. For async support, a good value would be 6 * number of Processors. *

Aws::Http::CurlHandleContainer::~CurlHandleContainer ( )

Member Function Documentation

CURL* Aws::Http::CurlHandleContainer::AcquireCurlHandle ( )

Blocks until a curl handle from the pool is available for use.

void Aws::Http::CurlHandleContainer::ReleaseCurlHandle ( CURL *  handle)

Returns a handle to the pool for reuse. It is imperative that this is called after you are finished with the handle.


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