transm/client/client.h

31 lines
584 B
C
Raw Normal View History

2024-12-11 23:23:48 +08:00
#pragma once
#include <net_base.h>
#include <util.h>
#include <vector>
#include <string>
2024-12-11 23:23:48 +08:00
class CClient
{
public:
CClient(const std::shared_ptr<spdlog::logger>& logger);
~CClient();
public:
void run();
public:
bool get_task_list();
bool get_clients();
2024-12-13 16:59:31 +08:00
bool down_task();
bool up_task();
private:
void handle_frame(CFrameBuffer* buf);
2024-12-11 23:23:48 +08:00
private:
std::shared_ptr<spdlog::logger> logger_;
asio::io_context io_context_;
std::shared_ptr<CTcpClient> client_;
std::vector<std::string> supported_;
2024-12-13 16:59:31 +08:00
std::map<int, std::string> task_list_;
2024-12-11 23:23:48 +08:00
};