feat(http_server): improve websocket server handling

1. Adds post handshake callback
2. Removes requirement to handle HTTP_GET message in websocket handler

Closes https://github.com/espressif/esp-idf/issues/18215
This commit is contained in:
Ashish Sharma
2026-03-16 13:57:59 +08:00
parent 799c800494
commit 6f392e6fd6
7 changed files with 104 additions and 15 deletions
+9
View File
@@ -72,4 +72,13 @@ menu "HTTP Server"
Enable this option to use WebSocket pre-handshake callback. This will allow the server to register
a callback function that will be called before the WebSocket handshake is processed i.e. before switching
to the WebSocket protocol.
config HTTPD_WS_POST_HANDSHAKE_CB_SUPPORT
bool "WebSocket post-handshake callback support"
default n
depends on HTTPD_WS_SUPPORT
help
Enable this option to use WebSocket post-handshake callback. This will allow the server to register
a callback function that will be called after the WebSocket handshake is processed i.e. after switching
to the WebSocket protocol.
endmenu