AWS IoT Device SDK C++ v2
1.44.2
AWS IoT Device SDK C++ v2
Toggle main menu visibility
Loading...
Searching...
No Matches
crt
aws-crt-cpp
include
aws
crt
mqtt
MqttClient.h
Go to the documentation of this file.
1
#pragma once
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
93
std
::shared_ptr<
MqttConnection
>
NewConnection
(
94
const
char
*hostName,
95
uint32_t port,
96
const
Io
::SocketOptions &socketOptions,
97
const
Crt
::
Io
::TlsContext &tlsContext,
98
bool
useWebsocket = false,
99
bool
enableMetrics = true) noexcept;
100
113
std
::shared_ptr<
MqttConnection
>
NewConnection
(
114
const
char
*hostName,
115
uint32_t port,
116
const
Io
::SocketOptions &socketOptions,
117
bool
useWebsocket = false,
118
bool
enableMetrics = true) noexcept;
119
120
private:
121
aws_mqtt_client *m_client;
122
};
123
}
// namespace Mqtt
124
}
// namespace Crt
125
}
// namespace Aws
HttpConnection.h
MqttConnection.h
SocketOptions.h
StlAllocator.h
TlsOptions.h
Types.h
Aws::Crt::Http::HttpRequest
Definition
HttpRequestResponse.h:110
Aws::Crt::Io::ClientBootstrap
Definition
Bootstrap.h:35
Aws::Crt::Mqtt::MqttClient::MqttClient
MqttClient(Io::ClientBootstrap &bootstrap, Allocator *allocator=ApiAllocator()) noexcept
Definition
MqttClient.cpp:24
Aws::Crt::Mqtt::MqttClient::MqttClient
MqttClient(const MqttClient &)=delete
Aws::Crt::Mqtt::MqttClient::LastError
int LastError() const noexcept
Definition
MqttClient.cpp:63
Aws::Crt::Mqtt::MqttClient::NewConnection
std::shared_ptr< MqttConnection > NewConnection(const char *hostName, uint32_t port, const Io::SocketOptions &socketOptions, const Crt::Io::TlsContext &tlsContext, bool useWebsocket=false, bool enableMetrics=true) noexcept
Definition
MqttClient.cpp:68
Aws::Crt::Mqtt::MqttConnection
Definition
MqttConnection.h:158
Exports.h
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition
Exports.h:36
Aws::Crt::Http
Definition
Credentials.h:28
Aws::Crt::Io
Definition
Credentials.h:23
Aws::Crt::Mqtt5
Definition
HttpRequestResponse.h:24
Aws::Crt::Mqtt
Definition
HttpRequestResponse.h:19
Aws::Crt
Definition
Allocator.h:13
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition
Allocator.cpp:24
Aws::Crt::Allocator
aws_allocator Allocator
Definition
Allocator.h:14
Aws
Definition
Allocator.h:11
std
Definition
StringView.h:862
Generated by
1.17.0