#pragma once #include #include #include #include #include "file_oper.h" class CClient { public: CClient(const std::shared_ptr& logger); ~CClient(); public: void run(); public: bool get_task_list(); bool down_task(); bool up_task(const std::string& cmd); bool cancel_task(); private: bool send_frame(int type, const char* data, int len); private: void handle_frame(CFrameBuffer* buf); private: std::shared_ptr logger_; asio::io_context io_context_; std::shared_ptr client_; std::vector supported_; std::map task_list_; };