Add options for esp_http_client and esp_websocket_client to support keepalive

This commit is contained in:
Shubham Kulkarni
2021-01-11 16:24:48 +05:30
committed by yuanjm
parent af50ceb5e6
commit 8610ce4f34
4 changed files with 38 additions and 2 deletions

View File

@@ -86,6 +86,10 @@ typedef struct {
char *user_agent; /*!< Websocket user-agent */
char *headers; /*!< Websocket additional headers */
int pingpong_timeout_sec; /*!< Period before connection is aborted due to no PONGs received, disabled if value is 0 */
bool keep_alive_enable; /*!< Enable keep-alive timeout */
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 */
} esp_websocket_client_config_t;
/**