AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | List of all members
Aws::Crt::Io::ClientBootstrap Class Referencefinal

#include <Bootstrap.h>

Public Member Functions

 ClientBootstrap (EventLoopGroup &elGroup, HostResolver &resolver, Allocator *allocator=ApiAllocator()) noexcept
 
 ClientBootstrap (Allocator *allocator=ApiAllocator()) noexcept
 
 ~ClientBootstrap ()
 
 ClientBootstrap (const ClientBootstrap &)=delete
 
ClientBootstrapoperator= (const ClientBootstrap &)=delete
 
 ClientBootstrap (ClientBootstrap &&)=delete
 
ClientBootstrapoperator= (ClientBootstrap &&)=delete
 
 operator bool () const noexcept
 
int LastError () const noexcept
 
void SetShutdownCompleteCallback (OnClientBootstrapShutdownComplete callback)
 
void EnableBlockingShutdown () noexcept
 

Detailed Description

A ClientBootstrap handles creation and setup of socket connections to specific endpoints.

Note that ClientBootstrap may not clean up all its behind-the-scenes resources immediately upon destruction. If you need to know when behind-the-scenes shutdown is complete, use SetShutdownCompleteCallback() or EnableBlockingShutdown() (only safe on main thread).

Constructor & Destructor Documentation

◆ ClientBootstrap() [1/4]

Aws::Crt::Io::ClientBootstrap::ClientBootstrap ( EventLoopGroup elGroup,
HostResolver resolver,
Allocator allocator = ApiAllocator() 
)
noexcept
Parameters
elGroupEventLoopGroup to use.
resolverDNS host resolver to use.
allocatormemory allocator to use

◆ ClientBootstrap() [2/4]

Aws::Crt::Io::ClientBootstrap::ClientBootstrap ( Allocator allocator = ApiAllocator())
noexcept

◆ ~ClientBootstrap()

Aws::Crt::Io::ClientBootstrap::~ClientBootstrap ( )

◆ ClientBootstrap() [3/4]

Aws::Crt::Io::ClientBootstrap::ClientBootstrap ( const ClientBootstrap )
delete

◆ ClientBootstrap() [4/4]

Aws::Crt::Io::ClientBootstrap::ClientBootstrap ( ClientBootstrap &&  )
delete

Member Function Documentation

◆ EnableBlockingShutdown()

void Aws::Crt::Io::ClientBootstrap::EnableBlockingShutdown ( )
noexcept

Force the ClientBootstrap's destructor to block until all behind-the-scenes resources finish shutting down.

This isn't necessary during the normal flow of an application, but it is useful for scenarios, such as tests, that need deterministic shutdown ordering. Be aware, if you use this anywhere other than the main thread, YOU WILL MOST LIKELY CAUSE A DEADLOCK.

Use SetShutdownCompleteCallback() for a thread-safe way to know when shutdown is complete.

◆ LastError()

int Aws::Crt::Io::ClientBootstrap::LastError ( ) const
noexcept
Returns
the value of the last aws error encountered by operations on this instance.

◆ operator bool()

Aws::Crt::Io::ClientBootstrap::operator bool ( ) const
noexcept
Returns
true if the instance is in a valid state, false otherwise.

◆ operator=() [1/2]

ClientBootstrap& Aws::Crt::Io::ClientBootstrap::operator= ( ClientBootstrap &&  )
delete

◆ operator=() [2/2]

ClientBootstrap& Aws::Crt::Io::ClientBootstrap::operator= ( const ClientBootstrap )
delete

◆ SetShutdownCompleteCallback()

void Aws::Crt::Io::ClientBootstrap::SetShutdownCompleteCallback ( OnClientBootstrapShutdownComplete  callback)

Set function to invoke when ClientBootstrap's behind-the-scenes resources finish shutting down. This function may be invoked on any thread. Shutdown begins when the ClientBootstrap's destructor runs.


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