AWS IoT Device SDK C++ v2 1.44.1
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Iot::MqttClient Class Referencefinal

#include <MqttClient.h>

Public Member Functions

 MqttClient (Crt::Io::ClientBootstrap &bootstrap, Crt::Allocator *allocator=Crt::ApiAllocator()) noexcept
 MqttClient (Crt::Allocator *allocator=Crt::ApiAllocator()) noexcept
std::shared_ptr< Crt::Mqtt::MqttConnectionNewConnection (const MqttClientConnectionConfig &config) noexcept
int LastError () const noexcept
 operator bool () const noexcept

Detailed Description

AWS IOT specific Mqtt Client. Sets defaults for using the AWS IOT service. You'll need an instance of MqttClientConnectionConfig to use. Once NewConnection returns, you use it's return value identically to how you would use Aws::Crt::Mqtt::MqttConnection

Constructor & Destructor Documentation

◆ MqttClient() [1/2]

Aws::Iot::MqttClient::MqttClient ( Crt::Io::ClientBootstrap & bootstrap,
Crt::Allocator * allocator = Crt::ApiAllocator() )
noexcept

◆ MqttClient() [2/2]

Aws::Iot::MqttClient::MqttClient ( Crt::Allocator * allocator = Crt::ApiAllocator())
noexcept

Constructs a new Mqtt Client object using the static default ClientBootstrap.

For more information on the default ClientBootstrap see Aws::Crt::ApiHandle::GetOrCreateDefaultClientBootstrap

Member Function Documentation

◆ LastError()

int Aws::Iot::MqttClient::LastError ( ) const
inlinenoexcept
Returns
the value of the last aws error encountered by operations on this instance.

◆ NewConnection()

std::shared_ptr< Crt::Mqtt::MqttConnection > Aws::Iot::MqttClient::NewConnection ( const MqttClientConnectionConfig & config)
noexcept

Creates a new mqtt connection from a connection configuration object

Parameters
configmqtt connection configuration
Returns
a new mqtt connection

◆ operator bool()

Aws::Iot::MqttClient::operator bool ( ) const
inlineexplicitnoexcept
Returns
true if the instance is in a valid state, false otherwise.

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