Files
Ashish Sharma 5028b6230f 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
2026-02-27 09:59:05 +08:00

24 lines
995 B
Plaintext

menu "Example Configuration"
config EXAMPLE_ENABLE_WS_PRE_HANDSHAKE_CB
bool "Enable WebSocket pre-handshake callback"
select HTTPD_WS_PRE_HANDSHAKE_CB_SUPPORT
default y
help
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.
config EXAMPLE_ENABLE_WS_POST_HANDSHAKE_CB
bool "Enable WebSocket post-handshake callback"
select HTTPD_WS_POST_HANDSHAKE_CB_SUPPORT
default y
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.
In this example, the post-handshake callback is used to send a welcome message
to the client after the handshake is complete.
endmenu