Skip to main content

esp_mqtt5_client_set_disconnect_property

Function esp_mqtt5_client_set_disconnect_property 

Source
pub unsafe extern "C" fn esp_mqtt5_client_set_disconnect_property(
    client: *mut esp_mqtt_client,
    property: *const esp_mqtt5_disconnect_property_config_t,
) -> i32
Expand description

@brief Set MQTT5 client disconnect property configuration

This API will not store the disconnect property, it is one-time configuration. Before call esp_mqtt_client_disconnect to disconnect connection, call this API to set disconnect property if have

@param client mqtt client handle @param property disconnect property

@return ESP_ERR_NO_MEM if failed to allocate ESP_ERR_INVALID_ARG on wrong initialization ESP_FAIL on fail ESP_OK on success