aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
|
#include <MqttClient.h>
Public Member Functions | |
MqttClientConnectionConfig (const Crt::String &endpoint, uint16_t port, const Crt::Io::SocketOptions &socketOptions, Crt::Io::TlsContext &&tlsContext) | |
MqttClientConnectionConfig (const Crt::String &endpoint, uint16_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 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, |
uint16_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.
Aws::Iot::MqttClientConnectionConfig::MqttClientConnectionConfig | ( | const Crt::String & | endpoint, |
uint16_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.
|
staticnoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
friend |
|
friend |