#pragma once #include #include #include "Util/logger.h" #include "Network/TcpClient.h" using namespace std; using namespace toolkit; namespace VIA { class TCPClient: public TcpClient { private: /* data */ public: typedef std::shared_ptr Ptr; TCPClient():TcpClient() { DebugL; } ~TCPClient(){ DebugL; } protected: virtual void onConnect(const SockException &ex) override; virtual void onRecv(const Buffer::Ptr &pBuf) override; virtual void onFlush() override; virtual void onErr(const SockException &ex) override; virtual void onManager() override; private: int _nTick = 0; std::string _IP; int32_t _port; }; } // namespace VIA