pub unsafe extern "C" fn esp_mqtt_client_get_transport(
client: esp_mqtt_client_handle_t,
transport_scheme: *mut c_char,
) -> esp_transport_handle_tExpand description
@brief Get a transport from the scheme
Allows extra settings to be made on the selected transport, for convenience the scheme used by the mqtt client are defined as MQTT_OVER_TCP_SCHEME, MQTT_OVER_SSL_SCHEME, MQTT_OVER_WS_SCHEME and MQTT_OVER_WSS_SCHEME If the transport_scheme is NULL and the client was set with a custom transport the custom transport will be returned.
Notes:
- This function should be called only on MQTT_EVENT_BEFORE_CONNECT.
- The intetion is to provide a way to set different configurations than the ones available from client config.
- If esp_mqtt_client_destroy is called the returned pointer will be invalidated.
- All the required settings should be made in the MQTT_EVENT_BEFORE_CONNECT event handler
@param client MQTT client handle @param transport_scheme Transport handle to search for. @return the transport handle NULL in case of error