From 9dcca746edc11e3cc82e2b6fccb1f374b1757a83 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Mon, 5 Sep 2022 17:52:52 +0200 Subject: [PATCH] Reimpl send prot --- websocket/websocket.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/websocket/websocket.cpp b/websocket/websocket.cpp index ea9b2a0..ec35cd7 100644 --- a/websocket/websocket.cpp +++ b/websocket/websocket.cpp @@ -99,9 +99,9 @@ void Websocket::sendData(data &d) {"hash", lastHash}, }; - { - if (webSocket != nullptr) { - webSocket->send(json.dump(), false); - } + if (webSocket != nullptr) { + std::ostringstream msg; + msg << "SEND:" << user << ":" << json.dump(); + webSocket->send(msg.str(), false); } } \ No newline at end of file