pub type esp_mqtt_error_codes_t = esp_mqtt_error_codes;
Expand description

@brief MQTT error code structure to be passed as a contextual information into ERROR event

Important: This structure extends esp_tls_last_error error structure and is backward compatible with it (so might be down-casted and treated as esp_tls_last_error error, but recommended to update applications if used this way previously)

Use this structure directly checking error_type first and then appropriate error code depending on the source of the error:

| error_type | related member variables | note | | MQTT_ERROR_TYPE_TCP_TRANSPORT | esp_tls_last_esp_err, esp_tls_stack_err, esp_tls_cert_verify_flags, sock_errno | Error reported from tcp_transport/esp-tls | | MQTT_ERROR_TYPE_CONNECTION_REFUSED | connect_return_code | Internal error reported from MQTT broker on connection |

Aliased Type§

struct esp_mqtt_error_codes_t {
    pub esp_tls_last_esp_err: i32,
    pub esp_tls_stack_err: i32,
    pub esp_tls_cert_verify_flags: i32,
    pub error_type: u32,
    pub connect_return_code: u32,
    pub esp_transport_sock_errno: i32,
}

Fields§

§esp_tls_last_esp_err: i32

< last esp_err code reported from esp-tls component

§esp_tls_stack_err: i32

< tls specific error code reported from underlying tls stack

§esp_tls_cert_verify_flags: i32

< tls flags reported from underlying tls stack during certificate verification

§error_type: u32

< error type referring to the source of the error

§connect_return_code: u32

< connection refused error code reported from MQTT* broker on connection

§esp_transport_sock_errno: i32

< errno from the underlying socket