Wed, 03 Jul 2024 20:01:31 +0200
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
/** * @file task_http.h * @brief HTTP and Websocket server functions. */ #ifndef _TASK_HTTP_H #define _TASK_HTTP_H /** * @brief Send text to client with the set number. * @param num The client connection number. * @param msg The message to send. * @param len The length of the message to send. * @return 1 if message send. */ int ws_server_send_text_client(int num, char* msg); /** * @brief Sends text to all clients with the set url. * @param msg The message to send. * @return The number of clients the message was send to. */ int ws_server_send_text_clients(char* msg); /** * @brief Install the HTTP/Websocket server. */ void install_http_server(void); #endif