#[repr(C)]pub struct PamojaMqttConfig {
pub client_id: *const c_char,
pub host: *const c_char,
pub port: u16,
pub keep_alive_secs: u32,
pub capacity: u32,
pub qos: PamojaQos,
pub max_packet_size: u32,
pub username: *const c_char,
pub password: *const c_char,
pub will: *const PamojaMqttWill,
pub tls: *const PamojaMqttTls,
}Expand description
Connection settings for an MQTT client.
client_id and host are borrowed null-terminated UTF-8 strings. A
keep_alive_secs, capacity, or max_packet_size of 0 selects the core
default. username, password, will, and tls are each null when unused.
Fields§
§client_id: *const c_charThe MQTT client identifier presented to the broker.
host: *const c_charThe broker hostname or IP address.
port: u16The broker TCP port, conventionally 1883 for plaintext MQTT.
keep_alive_secs: u32Keep-alive interval in seconds, or 0 for the default of 30.
capacity: u32Bound on outstanding client requests, or 0 for the default of 64.
qos: PamojaQosDefault quality of service for publishes and subscriptions.
max_packet_size: u32The largest packet the connection sends or accepts, in bytes, or 0 for the default of 10,240.
username: *const c_charThe name to sign in to the broker with, or null.
password: *const c_charThe password to sign in with, which needs a username, or null.
will: *const PamojaMqttWillA message the broker publishes if the connection ends without a goodbye, or null.
tls: *const PamojaMqttTlsTLS settings, or null for plain TCP.