Browse Source

doc: websocket: update docs to describe additional callback parameter

Update HTTP server documentation and migration guide to account for
added request_ctx parameter to the http_resource_websocket_cb_t
callback.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
pull/83829/head
Matt Rodgers 6 months ago committed by Benjamin Cabé
parent
commit
579e5868b0
  1. 2
      doc/connectivity/networking/api/http_server.rst
  2. 5
      doc/releases/migration-guide-4.1.rst

2
doc/connectivity/networking/api/http_server.rst

@ -342,7 +342,7 @@ release it when done. @@ -342,7 +342,7 @@ release it when done.
static int ws_socket;
static uint8_t ws_recv_buffer[1024];
int ws_setup(int sock, void *user_data)
int ws_setup(int sock, struct http_request_ctx *request_ctx, void *user_data)
{
ws_socket = sock;
return 0;

5
doc/releases/migration-guide-4.1.rst

@ -367,6 +367,11 @@ Networking @@ -367,6 +367,11 @@ Networking
rather than directly in the :c:struct:`http_client_ctx` to correctly handle concurrent requests
on different HTTP/2 streams.
* The HTTP server public API function signature for the :c:type:`http_resource_websocket_cb_t` has
changed, a :c:struct:`http_request_ctx` parameter has been added. The application may use this to
access the request headers of the HTTP upgrade request, which may be useful in deciding whether
to accept or reject a websocket connection.
* The :kconfig:option:`CONFIG_NET_L2_OPENTHREAD` symbol no longer implies the
:kconfig:option:`CONFIG_NVS` Kconfig option. Platforms using OpenThread must explicitly enable
either the :kconfig:option:`CONFIG_NVS` or :kconfig:option:`CONFIG_ZMS` Kconfig option.

Loading…
Cancel
Save