AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
#include <MqttClient.h>
Public Member Functions | |
MqttClientConnectionConfig (const Crt::String &endpoint, uint32_t port, const Crt::Io::SocketOptions &socketOptions, Crt::Io::TlsContext &&tlsContext) | |
MqttClientConnectionConfig (const Crt::String &endpoint, uint32_t port, const Crt::Io::SocketOptions &socketOptions, Crt::Io::TlsContext &&tlsContext, Crt::Mqtt::OnWebSocketHandshakeIntercept &&interceptor, const Crt::Optional< Crt::Http::HttpClientConnectionProxyOptions > &proxyOptions) | |
operator bool () const noexcept | |
int | LastError () const noexcept |
Static Public Member Functions | |
static MqttClientConnectionConfig | CreateInvalid (int lastError) noexcept |
Friends | |
class | MqttClient |
class | MqttClientConnectionConfigBuilder |
Represents a unique configuration for connecting to a single AWS IoT endpoint. You can use a single instance of this class PER endpoint you want to connect to. This object must live through the lifetime of your connection.
Aws::Iot::MqttClientConnectionConfig::MqttClientConnectionConfig | ( | const Crt::String & | endpoint, |
uint32_t | port, | ||
const Crt::Io::SocketOptions & | socketOptions, | ||
Crt::Io::TlsContext && | tlsContext | ||
) |
Creates a client configuration for use with making new AWS Iot specific MQTT Connections with MTLS.
endpoint | endpoint to connect to |
port | port to connect to |
socketOptions | socket options to use when establishing the connection |
tlsContext | tls context that should be used for all connections sourced from this config |
Aws::Iot::MqttClientConnectionConfig::MqttClientConnectionConfig | ( | const Crt::String & | endpoint, |
uint32_t | port, | ||
const Crt::Io::SocketOptions & | socketOptions, | ||
Crt::Io::TlsContext && | tlsContext, | ||
Crt::Mqtt::OnWebSocketHandshakeIntercept && | interceptor, | ||
const Crt::Optional< Crt::Http::HttpClientConnectionProxyOptions > & | proxyOptions | ||
) |
Creates a client configuration for use with making new AWS Iot specific MQTT Connections with web sockets. interceptor: a callback invoked during web socket handshake giving you the opportunity to mutate the request for authorization/signing purposes. If not specified, it's assumed you don't need to sign the request. proxyOptions: optional, if you want to use a proxy with websockets, specify the configuration options here.
If proxy options are used, the tlsContext is applied to the connection to the remote endpoint, NOT the proxy. To make a tls connection to the proxy itself, you'll want to specify tls options in proxyOptions.
endpoint | endpoint to connect to |
port | port to connect to |
socketOptions | socket options to use when establishing the connection |
tlsContext | tls context that should be used for all connections sourced from this config |
interceptor | websocket upgrade handshake transformation function |
proxyOptions | proxy configuration options |
|
staticnoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
friend |
|
friend |