1 /* 2 * Copyright (c) 2024, Witekio 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/net/http/server.h> 8 9 /** 10 * @brief Setup websocket for echoing data back to client 11 * 12 * @param ws_socket Socket file descriptor associated with websocket 13 * @param request_ctx Request context associated with websocket HTTP upgrade request 14 * @param user_data User data pointer 15 * 16 * @return 0 on success 17 */ 18 int ws_echo_setup(int ws_socket, struct http_request_ctx *request_ctx, void *user_data); 19 20 /** 21 * @brief Setup websocket for sending net statistics to client 22 * 23 * @param ws_socket Socket file descriptor associated with websocket 24 * @param request_ctx Request context associated with websocket HTTP upgrade request 25 * @param user_data User data pointer 26 * 27 * @return 0 on success 28 */ 29 int ws_netstats_setup(int ws_socket, struct http_request_ctx *request_ctx, void *user_data); 30