feat: Add option to bind interface of use

Enable user to set which interface should be used for client network,
allowing client to be binded to the interface selected by user forcing
it to go through the selected interface.

Closes https://github.com/espressif/esp-mqtt/issues/253
This commit is contained in:
Euripedes Rocha
2023-06-13 10:32:55 +02:00
parent 63cfec799c
commit 363fbf7dab
3 changed files with 18 additions and 0 deletions

View File

@@ -334,6 +334,7 @@ typedef struct esp_mqtt_client_config_t {
bool disable_auto_reconnect; /*!< Client will reconnect to server (when errors/disconnect). Set
`disable_auto_reconnect=true` to disable */
esp_transport_handle_t transport; /*!< Custom transport handle to use. Warning: The transport should be valid during the client lifetime and is destroyed when esp_mqtt_client_destroy is called. */
struct ifreq * if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
} network; /*!< Network configuration */
/**
* Client task configuration