| 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>(); |
nothing calls this directly
no test coverage detected