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

This commit is contained in:
yuanjm
2021-01-19 17:50:31 +08:00
committed by bot
parent c62cbd1254
commit bead3599ab
4 changed files with 28 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
#include "http_parser.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include <sys/socket.h>
#ifdef __cplusplus
extern "C" {
@@ -135,6 +136,7 @@ typedef struct {
int keep_alive_idle; /*!< Keep-alive idle time. Default is 5 (second) */
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 */
struct ifreq *if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
} esp_http_client_config_t;
/**