components: Support bind socket to specified interface in esp_http_client and esp_websocket_client component

* Original commit: espressif/esp-idf@bead3599ab
This commit is contained in:
yuanjm
2021-01-19 17:50:31 +08:00
committed by gabsuren
parent f0351ff378
commit 4a608ec1cd
2 changed files with 13 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include "freertos/FreeRTOS.h"
#include "esp_err.h"
#include "esp_event.h"
#include <sys/socket.h>
#ifdef __cplusplus
extern "C" {
@ -100,6 +101,7 @@ typedef struct {
int keep_alive_interval; /*!< Keep-alive interval time. Default is 5 (second) */
int keep_alive_count; /*!< Keep-alive packet retry send count. Default is 3 counts */
size_t ping_interval_sec; /*!< Websocket ping interval, defaults to 10 seconds if not set */
struct ifreq *if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
} esp_websocket_client_config_t;
/**