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
Bootstrap.h
Go to the documentation of this file.
1#pragma once
7#include <aws/crt/Exports.h>
8#include <aws/crt/Types.h>
11
12#include <aws/io/channel_bootstrap.h>
13#include <aws/io/host_resolver.h>
14
15#include <future>
16
17namespace Aws
18{
19 namespace Crt
20 {
21 namespace Io
22 {
23 using OnClientBootstrapShutdownComplete = std::function<void()>;
24
35 {
36 public:
43 EventLoopGroup &elGroup,
44 HostResolver &resolver,
45 Allocator *allocator = ApiAllocator()) noexcept;
46
52 ClientBootstrap(Allocator *allocator = ApiAllocator()) noexcept;
53
59
63 operator bool() const noexcept;
64
68 int LastError() const noexcept;
69
76 void SetShutdownCompleteCallback(OnClientBootstrapShutdownComplete callback);
77
90 void EnableBlockingShutdown() noexcept;
91
93 aws_client_bootstrap *GetUnderlyingHandle() const noexcept;
94
95 private:
96 aws_client_bootstrap *m_bootstrap;
97 int m_lastError;
98 std::unique_ptr<class ClientBootstrapCallbackData> m_callbackData;
99 std::future<void> m_shutdownFuture;
100 bool m_enableBlockingShutdown;
101 };
102 } // namespace Io
103 } // namespace Crt
104} // namespace Aws
#define AWS_CRT_CPP_API
Definition Exports.h:36
Definition Bootstrap.h:35
ClientBootstrap(ClientBootstrap &&)=delete
ClientBootstrap & operator=(ClientBootstrap &&)=delete
ClientBootstrap(const ClientBootstrap &)=delete
ClientBootstrap & operator=(const ClientBootstrap &)=delete
Definition EventLoopGroup.h:33
Definition HostResolver.h:35
std::function< void()> OnClientBootstrapShutdownComplete
Definition Bootstrap.h:23
aws_allocator Allocator
Definition Allocator.h:14
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition Allocator.cpp:24
Definition Allocator.h:11
Definition StringView.h:862