websocket

split broadcast out of message function
This commit is contained in:
2024-08-22 11:19:31 +02:00
parent a6ec23fb24
commit aed0d52dbd
3 changed files with 43 additions and 24 deletions
+2
View File
@@ -38,9 +38,11 @@ int main(void)
g_web_socket = &web_socket;
std::thread message_processor_thread(std::bind(&Websocket::process_messages, &web_socket));
std::thread broadcast_processor_thred(std::bind(&Websocket::process_broadcast, &web_socket));
// Run the asio loop with the main thread
web_socket.run();
message_processor_thread.join();
broadcast_processor_thred.join();
}