Classes | Public Types | Public Member Functions | List of all members
util::http::HttpsClientPool Class Reference

Classes

class  HandleGuard
 

Public Types

using ClientHandle = std::unique_ptr< HttpsClient, HandleGuard >
 

Public Member Functions

 HttpsClientPool (const std::string &domain, ::boost::asio::ssl::context *ssl_ctx, IoContext *io_cntx)
 
ClientHandle GetHandle ()
 Returns https client connection from the pool. More...
 
void set_connect_timeout (unsigned msec)
 
void set_retry_count (uint32_t cnt)
 Sets number of retries for https client handles.
 
IoContextio_context ()
 
unsigned handles_count () const
 Number of existing handles created by this pool.
 
const std::string domain () const
 

Detailed Description

Definition at line 20 of file https_client_pool.h.

Member Function Documentation

◆ GetHandle()

auto util::http::HttpsClientPool::GetHandle ( )

Returns https client connection from the pool.

Must be called withing IoContext thread. Once ClientHandle destructs, the connection returns to the pool. GetHandle() might block the calling fiber for connect_msec_ millis in case it creates a new connection. Note that all allocated handles must be destroyed before destroying their parent pool.

Definition at line 38 of file https_client_pool.cc.


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