AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
#include <Mqtt5Client.h>
Represents a unique configuration for mqtt5 client and connection. Helps to setup Mqtt5ClientOptionsBuilder for mqtt5 client.
|
inlinevirtual |
|
delete |
|
delete |
|
noexcept |
Builds a client configuration object from the set options.
|
inlinenoexcept |
|
staticnoexcept |
Sets the builder up for connection using authorization configuration.
hostName | - AWS IoT endpoint to connect to |
customAuthConfig | custom authorization configuration information |
allocator | memory allocator to use |
|
staticnoexcept |
Sets the builder up for connection using authorization configuration using Websockets.
hostName | - AWS IoT endpoint to connect to |
customAuthConfig | custom authorization configuration information |
config | websocket configuration information |
allocator | memory allocator to use |
|
staticnoexcept |
Sets the builder up for MTLS using cert and pkey. These are in-memory buffers and must be in the PEM format.
hostName | - AWS IoT endpoint to connect to |
certPath | buffer containing the X509 certificate in a PEM format |
pkeyPath | buffer containing the private key in a PEM format |
allocator | memory allocator to use |
|
staticnoexcept |
Set the builder up for MTLS using certPath and pkeyPath. These are files on disk and must be in the PEM format.
hostName | - AWS IoT endpoint to connect to |
certPath | path to the X509 certificate (pem file) to use |
pkeyPath | path to the private key (pem file) to use |
allocator | memory allocator to use |
|
staticnoexcept |
Sets the builder up for MTLS, using a PKCS#11 library for private key operations.
NOTE: This only works on Unix devices.
hostName | - AWS IoT endpoint to connect to |
pkcs11Options | PKCS#11 options |
allocator | memory allocator to use |
|
staticnoexcept |
Sets the builder up for MTLS, using a PKCS#12 file for private key operations.
NOTE: This only works on MacOS devices.
hostName | - AWS IoT endpoint to connect to |
options | The PKCS12 options to use. |
allocator | - memory allocator to use |
|
staticnoexcept |
Sets the builder up for Websocket connection.
hostName | - AWS IoT endpoint to connect to |
config | websocket configuration information |
allocator | memory allocator to use |
|
staticnoexcept |
Sets the builder up for MTLS, using a certificate in a Windows certificate store.
NOTE: This only works on Windows.
hostName | - AWS IoT endpoint to connect to |
windowsCertStorePath | Path to certificate in a Windows certificate store. The path must use backslashes and end with the certificate's thumbprint. Example: CurrentUser\MY\A11F8A9B5DF5B98BA3508FBCA575D09570E0D2C6 |
allocator | memory allocator to use |
|
inlineexplicitnoexcept |
|
delete |
|
delete |
|
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.
ackTimeoutSec |
|
noexcept |
Mqtt5ClientBuilder::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.
ackTimeoutSec |
|
noexcept |
Set booststrap for mqtt5 client
bootStrap | bootstrap used for mqtt5 client. The default ClientBootstrap see Aws::Crt::ApiHandle::GetOrCreateStaticDefaultClientBootstrap. |
|
noexcept |
Sets the certificate authority for the endpoint you're connecting to. This is a path to a file on disk and must be in PEM format.
caPath | path to the CA file in PEM format |
|
noexcept |
Sets the certificate authority for the endpoint you're connecting to. This is an in-memory buffer and must be in PEM format.
cert | buffer containing the CA certificate in a PEM format |
|
noexcept |
Setup callback handler trigged when client begins an attempt to connect to the remote endpoint.
callback |
|
noexcept |
Setup callback trigged when client fails to establish an MQTT connection
callback |
|
noexcept |
Setup callback trigged when client successfully establishes an MQTT connection
callback |
|
noexcept |
Setup callback handler trigged when client's current MQTT connection is closed
callback |
|
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.
clientExtendedValidationAndFlowControl |
|
noexcept |
Setup callback handler trigged when client reaches the "Stopped" state
callback |
|
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.
connackTimeoutMs |
|
noexcept |
Sets mqtt5 connection options
packetConnect | package connection options |
|
noexcept |
Sets the custom authorizer settings. This function will modify the username, port, and TLS options.
Mqtt5ClientBuilder & Aws::Iot::Mqtt5ClientBuilder::WithHostName | ( | Crt::String | hostname | ) |
Sets the host to connect to.
hostname | endpoint to connect to |
|
noexcept |
Sets http proxy options.
proxyOptions | http proxy configuration for connection establishment |
|
noexcept |
Sets minConnectedTimeToResetReconnectDelayMs, amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum. This helps alleviate bandwidth-waste in fast reconnect cycles due to permission failures on operations.
minConnectedTimeToResetReconnectDelayMs |
|
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.
offlineQueueBehavior |
|
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.
pingTimeoutMs |
|
noexcept |
Set port to connect to
port | port to connect to |
|
noexcept |
Setup callback handler trigged when an MQTT PUBLISH packet is received by the client
callback |
|
noexcept |
Sets ReconnectOptions. Reconnect options includes retryJitterMode, min reconnect delay time and max reconnect delay time
reconnectOptions |
Mqtt5ClientBuilder & Aws::Iot::Mqtt5ClientBuilder::WithSdkName | ( | const Crt::String & | sdkName | ) |
Overrides the default SDK Name to send as a metric in the MQTT CONNECT packet.
sdkName | string to use as the SDK name parameter in the connection string |
Mqtt5ClientBuilder & Aws::Iot::Mqtt5ClientBuilder::WithSdkVersion | ( | const Crt::String & | sdkVersion | ) |
Overrides the default SDK Version to send as a metric in the MQTT CONNECT packet.
sdkVersion | string to use as the SDK version parameter in the connection string |
|
noexcept |
Sets session behavior. Overrides how the MQTT5 client should behave with respect to MQTT sessions.
sessionBehavior | how the MQTT5 client should behave with respect to MQTT sessions. |
|
noexcept |
Overrides the socket properties of the underlying MQTT connections made by the client. Leave undefined to use defaults (no TCP keep alive, 10 second socket timeout).
socketOptions | - The socket properties of the underlying MQTT connections made by the client |
|
noexcept |
Sets the topic aliasing behavior that the client should use.
topicAliasingOptions | topic aliasing behavior options to use |