#pragma once #include "abstract_coder.hpp" #include "abstract_tcp_connect.hpp" #include "tcp_buffer.hpp" #include namespace tinyrpc { class TcpClient; class ClientTcpConnection : public AbstractTcpConnection { public: ClientTcpConnection(int fd, Reactor& reactor, TcpClient& cli); ~ClientTcpConnection(); TcpBuffer& getSendBuffer() {return m_writeBuffer;} bool getResPackageData(const std::string& msg_req, std::shared_ptr& pb_struct); void process() override; private: TcpClient& m_client; std::unordered_map> m_respond_datas; // cli }; }