implement the message_parser function
This commit is contained in:
2024-08-22 13:58:18 +02:00
parent e12263b8d2
commit 6d76d0174c
+2 -1
View File
@@ -5,6 +5,7 @@
#include "simulators.hpp" #include "simulators.hpp"
#include "websocket.hpp" #include "websocket.hpp"
#include "message_parser.hpp"
Simulators g_simulators; Simulators g_simulators;
Websocket* g_web_socket; Websocket* g_web_socket;
@@ -34,7 +35,7 @@ int main(void)
// The server starts in this thread // The server starts in this thread
Websocket web_socket(9002, [](std::string message) { return message; }, []() { return g_simulators.changed_UI_items().dump(); }); Websocket web_socket(9002, [](std::string message) { return message_parser(message); }, []() { return g_simulators.changed_UI_items().dump(); });
g_web_socket = &web_socket; g_web_socket = &web_socket;
// Start the message processor and broadcast processor in separate threads // Start the message processor and broadcast processor in separate threads