aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
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< voidInitiateShutdown () noexcept
 

Static Public Member Functions

static std::shared_ptr< HttpClientConnectionManagerNewClientConnectionManager (const HttpClientConnectionManagerOptions &connectionManagerOptions, Allocator *allocator=ApiAllocator()) 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.

Parameters
onClientConnectionAvailablecallback to invoke when a connection becomes available or the acquisition attempt terminates
Returns
true if the acquisition was successfully kicked off, false otherwise (no callback)

◆ 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.

Returns
future which will complete when shutdown has completed

◆ NewClientConnectionManager()

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

Factory function for connection managers

Parameters
connectionManagerOptionsconnection manager configuration data
allocatorallocator to use
Returns
a new connection manager instance

Friends And Related Symbol Documentation

◆ ManagedConnection


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