https_server: Add provision for callback at session close

Closes https://github.com/espressif/esp-idf/issues/8288
This commit is contained in:
Laukik Hase
2022-03-29 11:38:34 +05:30
parent f8dad892ff
commit 1d71fbae92
3 changed files with 95 additions and 29 deletions

View File

@@ -21,10 +21,21 @@ typedef enum {
HTTPD_SSL_TRANSPORT_INSECURE // SSL disabled
} httpd_ssl_transport_mode_t;
/**
* @brief Indicates the state at which the user callback is executed,
* i.e at session creation or session close
*/
typedef enum {
HTTPD_SSL_USER_CB_SESS_CREATE,
HTTPD_SSL_USER_CB_SESS_CLOSE
} httpd_ssl_user_cb_state_t;
/**
* @brief Callback data struct, contains the ESP-TLS connection handle
* and the connection state at which the callback is executed
*/
typedef struct esp_https_server_user_cb_arg {
httpd_ssl_user_cb_state_t user_cb_state;
const esp_tls_t *tls;
} esp_https_server_user_cb_arg_t;