aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Public Member Functions | Static Public Member Functions | Friends | List of all members
Aws::Crt::Http::HttpClientConnectionManager Class Referencefinal

#include <HttpConnectionManager.h>

Inheritance diagram for Aws::Crt::Http::HttpClientConnectionManager:

Public Member Functions

 ~HttpClientConnectionManager ()
 
bool AcquireConnection (const OnClientConnectionAvailable &onClientConnectionAvailable) noexcept
 
std::future< void > InitiateShutdown () noexcept
 

Static Public Member Functions

static std::shared_ptr< HttpClientConnectionManagerNewClientConnectionManager (const HttpClientConnectionManagerOptions &connectionManagerOptions, Allocator *allocator=g_allocator) noexcept
 

Friends

class ManagedConnection
 

Detailed Description

Manages a pool of connections to a specific endpoint using the same socket and tls options.

Constructor & Destructor Documentation

◆ ~HttpClientConnectionManager()

Aws::Crt::Http::HttpClientConnectionManager::~HttpClientConnectionManager ( )

Member Function Documentation

◆ AcquireConnection()

bool Aws::Crt::Http::HttpClientConnectionManager::AcquireConnection ( const OnClientConnectionAvailable onClientConnectionAvailable)
noexcept

Acquires a connection from the pool. onClientConnectionAvailable will be invoked upon an available connection. Returns true if the connection request was successfully queued, returns false if it failed. On failure, onClientConnectionAvailable will not be invoked. After receiving a connection, it will automatically be cleaned up when your last reference to the shared_ptr is released.

◆ InitiateShutdown()

std::future< void > Aws::Crt::Http::HttpClientConnectionManager::InitiateShutdown ( )
noexcept

Starts shutdown of the connection manager. Returns a future to the connection manager's shutdown process. If EnableBlockingDestruct was enabled on the connection manager options, calling get() on the returned future will block until the last connection is released. If the option is not set, get() will immediately return.

◆ NewClientConnectionManager()

std::shared_ptr< HttpClientConnectionManager > Aws::Crt::Http::HttpClientConnectionManager::NewClientConnectionManager ( const HttpClientConnectionManagerOptions connectionManagerOptions,
Allocator allocator = g_allocator 
)
staticnoexcept

Factory function for connection managers

Friends And Related Function Documentation

◆ ManagedConnection

friend class ManagedConnection
friend

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