mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-11-06 01:52:15 +01:00
Add client force reconnect function
esp-mqtt library is unaware of underlying network connectivity states and current auto reconnect mechanism is built around timed retry attempts every MQTT_RECONNECT_TIMEOUT_MS. As application code usually keeps track of network connectity state export a new function that application can use to request a forced reconnect attempt as soon as connected to the network.
This commit is contained in:
@@ -110,6 +110,7 @@ typedef struct {
|
||||
esp_mqtt_client_handle_t esp_mqtt_client_init(const esp_mqtt_client_config_t *config);
|
||||
esp_err_t esp_mqtt_client_set_uri(esp_mqtt_client_handle_t client, const char *uri);
|
||||
esp_err_t esp_mqtt_client_start(esp_mqtt_client_handle_t client);
|
||||
esp_err_t esp_mqtt_client_reconnect(esp_mqtt_client_handle_t client);
|
||||
esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client);
|
||||
esp_err_t esp_mqtt_client_subscribe(esp_mqtt_client_handle_t client, const char *topic, int qos);
|
||||
esp_err_t esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *topic);
|
||||
|
||||
Reference in New Issue
Block a user