mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-16 23:05:38 +00:00
http_server: Add a flag to enable using control frames in user handlers
This commit is contained in:
@@ -174,6 +174,7 @@ esp_err_t httpd_register_uri_handler(httpd_handle_t handle,
|
||||
hd->hd_calls[i]->user_ctx = uri_handler->user_ctx;
|
||||
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||
hd->hd_calls[i]->is_websocket = uri_handler->is_websocket;
|
||||
hd->hd_calls[i]->handle_ws_control_frames = uri_handler->handle_ws_control_frames;
|
||||
#endif
|
||||
ESP_LOGD(TAG, LOG_FMT("[%d] installed %s"), i, uri_handler->uri);
|
||||
return ESP_OK;
|
||||
@@ -322,6 +323,7 @@ esp_err_t httpd_uri(struct httpd_data *hd)
|
||||
|
||||
aux->sd->ws_handshake_done = true;
|
||||
aux->sd->ws_handler = uri->handler;
|
||||
aux->sd->ws_control_frames = uri->handle_ws_control_frames;
|
||||
|
||||
/* Return immediately after handshake, no need to call handler here */
|
||||
return ESP_OK;
|
||||
|
Reference in New Issue
Block a user