aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
aws
crt
mqtt
MqttClient.h
Go to the documentation of this file.
1
#pragma once
2
6
#include <
aws/crt/Exports.h
>
7
#include <
aws/crt/StlAllocator.h
>
8
#include <
aws/crt/Types.h
>
9
#include <
aws/crt/http/HttpConnection.h
>
10
#include <
aws/crt/io/SocketOptions.h
>
11
#include <
aws/crt/io/TlsOptions.h
>
12
#include <
aws/crt/mqtt/MqttConnection.h
>
13
14
#include <aws/mqtt/client.h>
15
#include <aws/mqtt/v5/mqtt5_client.h>
16
17
#include <atomic>
18
#include <functional>
19
#include <memory>
20
21
namespace
Aws
22
{
23
namespace
Crt
24
{
25
namespace
Io
26
{
27
class
ClientBootstrap;
28
}
29
30
namespace
Http
31
{
32
class
HttpRequest;
33
}
34
35
namespace
Mqtt5
36
{
37
class
Mqtt5ClientCore;
38
}
39
40
namespace
Mqtt
41
{
47
class
AWS_CRT_CPP_API
MqttClient
final
48
{
49
public
:
53
MqttClient
(
Io::ClientBootstrap
&bootstrap,
Allocator
*allocator =
ApiAllocator
()) noexcept;
54
61
MqttClient
(
Allocator
*allocator =
ApiAllocator
()) noexcept;
62
63
~
MqttClient
();
64
MqttClient
(
const
MqttClient
&) =
delete
;
65
MqttClient
(
MqttClient
&&) noexcept;
66
MqttClient
&operator=(
const
MqttClient
&) =
delete
;
67
MqttClient
&operator=(
MqttClient
&&) noexcept;
68
72
operator
bool()
const
noexcept;
73
77
int
LastError
()
const
noexcept;
78
92
std::shared_ptr<MqttConnection> NewConnection(
93
const
char
*hostName,
94
uint32_t port,
95
const
Io::SocketOptions
&socketOptions,
96
const
Crt::Io::TlsContext
&tlsContext,
97
bool
useWebsocket =
false
) noexcept;
98
110
std::shared_ptr<MqttConnection> NewConnection(
111
const
char
*hostName,
112
uint32_t port,
113
const
Io::SocketOptions
&socketOptions,
114
bool
useWebsocket =
false
) noexcept;
115
116
private
:
117
aws_mqtt_client *m_client;
118
};
119
}
// namespace Mqtt
120
}
// namespace Crt
121
}
// namespace Aws
Aws::Crt::Io::TlsContext
Definition:
TlsOptions.h:349
SocketOptions.h
Types.h
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition:
Exports.h:36
StlAllocator.h
Aws::Crt::Allocator
aws_allocator Allocator
Definition:
Allocator.h:14
TlsOptions.h
Aws::Crt::Mqtt::MqttClient
Definition:
MqttClient.h:47
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition:
Allocator.cpp:24
Exports.h
Aws::Crt::Io::ClientBootstrap
Definition:
Bootstrap.h:34
Aws::Crt::LastError
AWS_CRT_CPP_API int LastError() noexcept
Definition:
Api.cpp:425
HttpConnection.h
MqttConnection.h
Aws::Crt::Io::SocketOptions
Definition:
SocketOptions.h:47
Aws
Definition:
Allocator.h:10
Generated by
1.8.10