#pragma once #include "tcp_connection.hpp" #include #include namespace tinyrpc { class IOThread { public: IOThread(); ~IOThread(); bool addClient(int fd); private: void mainFunc(); private: std::unordered_map m_clients; std::thread m_thread; }; }