added an overlay to the WebUI and some ConnectionHandling

This commit is contained in:
2024-01-12 13:29:22 +01:00
parent 94e407208e
commit f1defa98f2
7 changed files with 62 additions and 8 deletions

View File

@@ -118,6 +118,26 @@ void Webserver_Process()
}
}
/**
* @brief Shuts down the web server functionality for the ChainLube application.
*
* This function closes all WebSocket connections and terminates the web server. It is intended
* to be called when the application is being shut down or when there is a need to deactivate the
* web server.
*
* @details This function ensures a graceful shutdown of the web server by closing all active
* WebSocket connections and ending the web server instance.
*
* @note This function should be called before shutting down the application to properly
* deactivate the web server.
*/
void Webserver_Shutdown()
{
if (webSocket.count() > 0)
webSocket.closeAll();
webServer.end();
}
/**
* @brief Callback function for handling HTTP 404 (Not Found) errors on the web server.
*
@@ -757,7 +777,7 @@ void parseWebsocketString(char *data, char *identifierBuffer, size_t identifierB
* @param searchString The string to search for in the array.
* @param array The array of strings to search within.
* @param arraySize The size of the array.
*
*
* @return The index of the first occurrence of the string in the array,
* or -1 if the string is not found.
*/