web_server 初步改

This commit is contained in:
2026-08-21 12:26:54 +08:00
parent 8499ae4555
commit d1aa763fcd
4 changed files with 54 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
#include "Plot.hpp"
namespace aethera::web {
Plot::Plot(std::string key_value, std::shared_ptr<Graph_WebSocket> websocket_value) : websocket(std::move(websocket_value)), key(std::move(key_value)) { websocket->register_callback(key, [this](std::string_view event) { on_event(event); }); }
Plot::~Plot() { websocket->unregister_callback(key); }
void Plot::send_frame(std::string_view frame) { websocket->send(key, frame); }
}