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. | |
IoContext & | io_context () |
unsigned | handles_count () const |
Number of existing handles created by this pool. | |
const std::string | domain () const |
Definition at line 20 of file https_client_pool.h.
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.