AWS IoT Device SDK C++ v2  1.32.6
AWS IoT Device SDK C++ v2
Public Member Functions | Friends | List of all members
Aws::Crt::Mqtt5::Mqtt5ClientOptions Class Referencefinal

#include <Mqtt5Client.h>

Public Member Functions

 Mqtt5ClientOptions (Crt::Allocator *allocator=ApiAllocator()) noexcept
 
Mqtt5ClientOptionsWithHostName (Crt::String hostname)
 
Mqtt5ClientOptionsWithPort (uint32_t port) noexcept
 
Mqtt5ClientOptionsWithBootstrap (Io::ClientBootstrap *bootStrap) noexcept
 
Mqtt5ClientOptionsWithSocketOptions (Io::SocketOptions socketOptions) noexcept
 
Mqtt5ClientOptionsWithTlsConnectionOptions (const Io::TlsConnectionOptions &tslOptions) noexcept
 
Mqtt5ClientOptionsWithHttpProxyOptions (const Crt::Http::HttpClientConnectionProxyOptions &proxyOptions) noexcept
 
Mqtt5ClientOptionsWithConnectOptions (std::shared_ptr< ConnectPacket > connectPacket) noexcept
 
Mqtt5ClientOptionsWithSessionBehavior (ClientSessionBehaviorType sessionBehavior) noexcept
 
Mqtt5ClientOptionsWithClientExtendedValidationAndFlowControl (ClientExtendedValidationAndFlowControl clientExtendedValidationAndFlowControl) noexcept
 
Mqtt5ClientOptionsWithOfflineQueueBehavior (ClientOperationQueueBehaviorType offlineQueueBehavior) noexcept
 
Mqtt5ClientOptionsWithReconnectOptions (ReconnectOptions reconnectOptions) noexcept
 
Mqtt5ClientOptionsWithTopicAliasingOptions (TopicAliasingOptions topicAliasingOptions) noexcept
 
Mqtt5ClientOptionsWithPingTimeoutMs (uint32_t pingTimeoutMs) noexcept
 
Mqtt5ClientOptionsWithConnackTimeoutMs (uint32_t connackTimeoutMs) noexcept
 
Mqtt5ClientOptionsWithAckTimeoutSeconds (uint32_t ackTimeoutSec) noexcept
 
Mqtt5ClientOptionsWithAckTimeoutSec (uint32_t ackTimeoutSec) noexcept
 
Mqtt5ClientOptionsWithWebsocketHandshakeTransformCallback (OnWebSocketHandshakeIntercept callback) noexcept
 
Mqtt5ClientOptionsWithClientConnectionSuccessCallback (OnConnectionSuccessHandler callback) noexcept
 
Mqtt5ClientOptionsWithClientConnectionFailureCallback (OnConnectionFailureHandler callback) noexcept
 
Mqtt5ClientOptionsWithClientDisconnectionCallback (OnDisconnectionHandler callback) noexcept
 
Mqtt5ClientOptionsWithClientStoppedCallback (OnStoppedHandler callback) noexcept
 
Mqtt5ClientOptionsWithClientAttemptingConnectCallback (OnAttemptingConnectHandler callback) noexcept
 
Mqtt5ClientOptionsWithPublishReceivedCallback (OnPublishReceivedHandler callback) noexcept
 
bool initializeRawOptions (aws_mqtt5_client_options &raw_options) const noexcept
 
virtual ~Mqtt5ClientOptions ()
 
 Mqtt5ClientOptions (const Mqtt5ClientOptions &)=delete
 
 Mqtt5ClientOptions (Mqtt5ClientOptions &&)=delete
 
Mqtt5ClientOptionsoperator= (const Mqtt5ClientOptions &)=delete
 
Mqtt5ClientOptionsoperator= (Mqtt5ClientOptions &&)=delete
 

Friends

class Mqtt5ClientCore
 
class Mqtt5to3AdapterOptions
 

Detailed Description

Configuration interface for mqtt5 clients

Constructor & Destructor Documentation

◆ Mqtt5ClientOptions() [1/3]

Aws::Crt::Mqtt5::Mqtt5ClientOptions::Mqtt5ClientOptions ( Crt::Allocator allocator = ApiAllocator())
noexcept

Default constructior of Mqtt5ClientOptions

Mqtt5ClientOptions

◆ ~Mqtt5ClientOptions()

Aws::Crt::Mqtt5::Mqtt5ClientOptions::~Mqtt5ClientOptions ( )
virtual

◆ Mqtt5ClientOptions() [2/3]

Aws::Crt::Mqtt5::Mqtt5ClientOptions::Mqtt5ClientOptions ( const Mqtt5ClientOptions )
delete

◆ Mqtt5ClientOptions() [3/3]

Aws::Crt::Mqtt5::Mqtt5ClientOptions::Mqtt5ClientOptions ( Mqtt5ClientOptions &&  )
delete

Member Function Documentation

◆ initializeRawOptions()

bool Aws::Crt::Mqtt5::Mqtt5ClientOptions::initializeRawOptions ( aws_mqtt5_client_options &  raw_options) const
noexcept

Initializes the C aws_mqtt5_client_options from Mqtt5ClientOptions. For internal use

Parameters
raw_options- output parameter containing low level client options to be passed to the C interface

◆ operator=() [1/2]

Mqtt5ClientOptions& Aws::Crt::Mqtt5::Mqtt5ClientOptions::operator= ( const Mqtt5ClientOptions )
delete

◆ operator=() [2/2]

Mqtt5ClientOptions& Aws::Crt::Mqtt5::Mqtt5ClientOptions::operator= ( Mqtt5ClientOptions &&  )
delete

◆ WithAckTimeoutSec()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithAckTimeoutSec ( uint32_t  ackTimeoutSec)
noexcept

Sets Operation Timeout(Seconds). Time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.

Parameters
ackTimeoutSec
Returns
this option object

◆ WithAckTimeoutSeconds()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithAckTimeoutSeconds ( uint32_t  ackTimeoutSec)
noexcept
Deprecated:
The function is deprecated, please use Mqtt5ClientOptions::WithAckTimeoutSec(uint32_t)

Sets Operation Timeout(Seconds). Time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.

Parameters
ackTimeoutSec
Returns
this option object

◆ WithBootstrap()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithBootstrap ( Io::ClientBootstrap bootStrap)
noexcept

Set booststrap for mqtt5 client

Parameters
bootStrapbootstrap used for mqtt5 client. The default ClientBootstrap see Aws::Crt::ApiHandle::GetOrCreateStaticDefaultClientBootstrap.
Returns
this option object

◆ WithClientAttemptingConnectCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientAttemptingConnectCallback ( OnAttemptingConnectHandler  callback)
noexcept

Sets callback trigged when client begins an attempt to connect to the remote endpoint.

Parameters
callback
Returns
this option object

◆ WithClientConnectionFailureCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientConnectionFailureCallback ( OnConnectionFailureHandler  callback)
noexcept

Sets callback trigged when client fails to establish an MQTT connection

Parameters
callback
Returns
this option object

◆ WithClientConnectionSuccessCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientConnectionSuccessCallback ( OnConnectionSuccessHandler  callback)
noexcept

Sets callback trigged when client successfully establishes an MQTT connection

Parameters
callback
Returns
this option object

◆ WithClientDisconnectionCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientDisconnectionCallback ( OnDisconnectionHandler  callback)
noexcept

Sets callback trigged when client's current MQTT connection is closed

Parameters
callback
Returns
this option object

◆ WithClientExtendedValidationAndFlowControl()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientExtendedValidationAndFlowControl ( ClientExtendedValidationAndFlowControl  clientExtendedValidationAndFlowControl)
noexcept

Sets client extended validation and flow control, additional controls for client behavior with respect to operation validation and flow control; these checks go beyond the base MQTT5 spec to respect limits of specific MQTT brokers.

Parameters
clientExtendedValidationAndFlowControl
Returns
this option object

◆ WithClientStoppedCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithClientStoppedCallback ( OnStoppedHandler  callback)
noexcept

Sets callback trigged when client reaches the "Stopped" state

Parameters
callback
Returns
this option object

◆ WithConnackTimeoutMs()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithConnackTimeoutMs ( uint32_t  connackTimeoutMs)
noexcept

Sets Connack Timeout (ms). Time interval to wait after sending a CONNECT request for a CONNACK to arrive. If one does not arrive, the connection will be shut down.

Parameters
connackTimeoutMs
Returns
this option object

◆ WithConnectOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithConnectOptions ( std::shared_ptr< ConnectPacket connectPacket)
noexcept

Sets mqtt5 connection options

Parameters
connectPacketpackage connection options
Returns
this option object

◆ WithHostName()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithHostName ( Crt::String  hostname)

Sets host to connect to.

Parameters
hostnameendpoint to connect to
Returns
this option object

◆ WithHttpProxyOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithHttpProxyOptions ( const Crt::Http::HttpClientConnectionProxyOptions proxyOptions)
noexcept

Sets http proxy options.

Parameters
proxyOptionshttp proxy configuration for connection establishment
Returns
this option object

◆ WithOfflineQueueBehavior()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithOfflineQueueBehavior ( ClientOperationQueueBehaviorType  offlineQueueBehavior)
noexcept

Sets OfflineQueueBehavior, controls how disconnects affect the queued and in-progress operations tracked by the client. Also controls how new operations are handled while the client is not connected. In particular, if the client is not connected, then any operation that would be failed on disconnect (according to these rules) will also be rejected.

Parameters
offlineQueueBehavior
Returns
this option object

◆ WithPingTimeoutMs()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithPingTimeoutMs ( uint32_t  pingTimeoutMs)
noexcept

Sets ping timeout (ms). Time interval to wait after sending a PINGREQ for a PINGRESP to arrive. If one does not arrive, the client will close the current connection.

Parameters
pingTimeoutMs
Returns
this option object

◆ WithPort()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithPort ( uint32_t  port)
noexcept

Set port to connect to

Parameters
portport to connect to
Returns
this option object

◆ WithPublishReceivedCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithPublishReceivedCallback ( OnPublishReceivedHandler  callback)
noexcept

Sets callback trigged when a PUBLISH packet is received by the client

Parameters
callback
Returns
this option object

◆ WithReconnectOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithReconnectOptions ( ReconnectOptions  reconnectOptions)
noexcept

Sets ReconnectOptions. Reconnect options, includes retryJitterMode, min reconnect delay time and max reconnect delay time and reset reconnect delay time

Parameters
reconnectOptions
Returns
this option object

◆ WithSessionBehavior()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithSessionBehavior ( ClientSessionBehaviorType  sessionBehavior)
noexcept

Sets session behavior. Overrides how the MQTT5 client should behave with respect to MQTT sessions.

Parameters
sessionBehavior
Returns
this option object

◆ WithSocketOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithSocketOptions ( Io::SocketOptions  socketOptions)
noexcept

Sets the aws socket options

Parameters
socketOptionsIo::SocketOptions used to setup socket
Returns
this option object

◆ WithTlsConnectionOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithTlsConnectionOptions ( const Io::TlsConnectionOptions tslOptions)
noexcept

Sets the tls connection options

Parameters
tslOptionsIo::TlsConnectionOptions
Returns
this option object

◆ WithTopicAliasingOptions()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithTopicAliasingOptions ( TopicAliasingOptions  topicAliasingOptions)
noexcept

Sets the topic aliasing behavior for the client.

Parameters
topicAliasingOptionstopic aliasing behavior options to use
Returns
this options object

◆ WithWebsocketHandshakeTransformCallback()

Mqtt5ClientOptions & Aws::Crt::Mqtt5::Mqtt5ClientOptions::WithWebsocketHandshakeTransformCallback ( OnWebSocketHandshakeIntercept  callback)
noexcept

Sets callback for transform HTTP request. This callback allows a custom transformation of the HTTP request that acts as the websocket handshake. Websockets will be used if this is set to a valid transformation callback. To use websockets but not perform a transformation, just set this as a trivial completion callback. If undefined, the connection will be made with direct MQTT.

Parameters
callback
Returns
this option object

Friends And Related Function Documentation

◆ Mqtt5ClientCore

friend class Mqtt5ClientCore
friend

◆ Mqtt5to3AdapterOptions

friend class Mqtt5to3AdapterOptions
friend

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