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

Method CtPanelClient

src/client/network/ct_panel_client.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17 CtPanelClient::CtPanelClient(const std::shared_ptr<ClientContext>& ctx) {
18 context_ = ctx;
19 msg_listener_ = ctx->ObtainMessageListener();
20 msg_listener_->Listen<MsgClientFileTransmissionBegin>([=, this](const MsgClientFileTransmissionBegin& msg) {
21 context_->PostTask([=, this]() {
22 this->ReportFileTransferBegin(msg);
23 });
24 });
25
26 msg_listener_->Listen<MsgClientFileTransmissionEnd>([=, this](const MsgClientFileTransmissionEnd& msg) {
27 context_->PostTask([=, this]() {
28 this->ReportFileTransferEnd(msg);
29 });
30 });
31 }
32
33 void CtPanelClient::Start() {
34 client_ = std::make_shared<asio2::ws_client>();

Callers

nothing calls this directly

Calls 4

ReportFileTransferEndMethod · 0.95
ObtainMessageListenerMethod · 0.45
PostTaskMethod · 0.45

Tested by

no test coverage detected