MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / ProcessHeartBeat

Method ProcessHeartBeat

src/render/plugins/plugin_net_event_router.cpp:364–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362 }
363
364 void PluginNetEventRouter::ProcessHeartBeat(std::shared_ptr<Message>&& msg) {
365 app_->PostGlobalTask([=, this]() {
366 auto& hb = msg->heartbeat();
367 auto proto_msg = NetMessageMaker::MakeOnHeartBeatMsg(app_, hb.index(), hb.timestamp());
368 app_->PostNetMessage(proto_msg);
369 });
370
371 auto event = std::make_shared<MsgClientHeartbeat>();
372 event->device_id_ = msg->device_id();
373 event->stream_id_ = msg->stream_id();
374 event->hb_index_ = msg->heartbeat().index();
375 event->timestamp_ = msg->heartbeat().timestamp();
376 plugin_manager_->VisitAllPlugins([=, this](GrPluginInterface* plugin) {
377 plugin->DispatchAppEvent(event);
378 });
379 }
380
381 void PluginNetEventRouter::ProcessClipboardInfo(std::shared_ptr<Message>&& msg) {
382 //if (auto plugin = plugin_manager_->GetClipboardPlugin(); plugin) {

Callers

nothing calls this directly

Calls 4

PostGlobalTaskMethod · 0.80
PostNetMessageMethod · 0.45
VisitAllPluginsMethod · 0.45
DispatchAppEventMethod · 0.45

Tested by

no test coverage detected