mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Modify esp-tls and tcp_transport to support keep alive for tcp and ssl connection
Closes IDFGH-4543
This commit is contained in:
@@ -126,6 +126,16 @@ typedef struct psk_key_hint {
|
||||
const char* hint; /*!< hint in PSK authentication mode in string format */
|
||||
} psk_hint_key_t;
|
||||
|
||||
/**
|
||||
* @brief Keep alive parameters structure
|
||||
*/
|
||||
typedef struct tls_keep_alive_cfg {
|
||||
bool keep_alive_enable; /*!< Enable keep-alive timeout */
|
||||
int keep_alive_idle; /*!< Keep-alive idle time (second) */
|
||||
int keep_alive_interval; /*!< Keep-alive interval time (second) */
|
||||
int keep_alive_count; /*!< Keep-alive packet retry send count */
|
||||
} tls_keep_alive_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief ESP-TLS configuration parameters
|
||||
*
|
||||
@@ -213,6 +223,8 @@ typedef struct esp_tls_cfg {
|
||||
|
||||
bool skip_common_name; /*!< Skip any validation of server certificate CN field */
|
||||
|
||||
tls_keep_alive_cfg_t *keep_alive_cfg; /*!< Enable TCP keep-alive timeout for SSL connection */
|
||||
|
||||
const psk_hint_key_t* psk_hint_key; /*!< Pointer to PSK hint and key. if not NULL (and certificates are NULL)
|
||||
then PSK authentication is enabled with configured setup.
|
||||
Important note: the pointer must be valid for connection */
|
||||
|
Reference in New Issue
Block a user