MQTT Client broker information structure v2.
This structure holds the information required to connect to an MQTT broker, including:
Broker's IP address and port
MQTT broker hostname
Connection encryption status
Connection timeout, keep-alive interval, and keep-alive retries
SNI support: enable/disable and SNI hostname
Note
The
host_namefield is reserved for future support of MQTT broker hostname.The
sni_host_namefield is used for Server Name Indication (SNI) when connecting over TLS. This is required for AWS IoT and similar brokers.If SNI is enabled (
enable_sniis true),sni_host_namemust be provided and will be programmed into the firmware before connecting.For non-TLS connections, SNI fields are ignored.
Public Attributes#
IP address of the broker.
MQTT broker hostname (not currently supported).
Port number of the broker.
Indicates if the connection is encrypted. This field will be deprecated in future releases. Use tls_flags in sl_mqtt_client_configuration_t instead.
MQTT connection timeout in milliseconds.
Keep-alive interval of the MQTT connection in seconds.
Number of MQTT ping retries.
Enable or disable SNI extension in MQTT.
Hostname to use in SNI (required for TLS/SNI connections; e.g., AWS IoT).
Public Attribute Documentation#
is_connection_encrypted#
bool sl_mqtt_broker_v2_t::is_connection_encrypted
Indicates if the connection is encrypted. This field will be deprecated in future releases. Use tls_flags in sl_mqtt_client_configuration_t instead.
connect_timeout#
uint16_t sl_mqtt_broker_v2_t::connect_timeout
MQTT connection timeout in milliseconds.
keep_alive_interval#
uint16_t sl_mqtt_broker_v2_t::keep_alive_interval
Keep-alive interval of the MQTT connection in seconds.
sni_host_name#
uint8_t* sl_mqtt_broker_v2_t::sni_host_name
Hostname to use in SNI (required for TLS/SNI connections; e.g., AWS IoT).