#include "Plot.hpp" namespace aethera::web { Plot::Plot(std::string key_value, std::shared_ptr 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); } }