/* * @Description: * @Version: 1.0 * @Autor: lishengyin * @Date: 2022-04-11 17:30:58 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-04-12 00:07:32 */ #ifndef __TCPPROXYSESSION_HPP_ #define __TCPPROXYSESSION_HPP_ #include #include #include "Util/logger.h" #include "Util/NoticeCenter.h" #include "UserApp.hpp" #include "Network/TcpServer.h" #include "Network/TcpSession.h" #include #include using namespace std; using namespace toolkit; class TcpProxySession; class TcpProxySession: public TcpSession { public: TcpProxySession(const Socket::Ptr &sock) : TcpSession(sock) { DebugL; } ~TcpProxySession() { DebugL; } virtual void onRecv(const Buffer::Ptr &buf) override; virtual void onError(const SockException &err) override; virtual void onManager() override; private: Ticker _ticker; bool alive = false; std::string usr = ""; }; #endif