1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #pragma once
- #include <signal.h>
- #include <iostream>
- #include "Util/logger.h"
- #include "Network/TcpClient.h"
- #include "Util/NoticeCenter.h"
- #include "Notices.h"
- #include "md5.h"
- #include <time.h>
- #include <ctime>
- #include "SendLogin.h"
- #include "NettyServerCommandEnum.h"
- #include "NettyServerResultMsg.h"
- #include "NettyClientResultMsg.h"
- #include "SendLogin.h"
- #include "NettyClientCommandEnum.h"
- #include "SendHeartBeat.h"
- #include "Util/logger.h"
- #include "Util/NoticeCenter.h"
- #include "Poller/EventPoller.h"
- #include "Util/SqlPool.h"
- #include "Network/TcpClient.h"
- #include "Poller/Timer.h"
- using namespace std;
- using namespace toolkit;
- namespace MIVA
- {
- class TCPClient: public TcpClient
- {
- public:
- std::string privateKey = "mwWAH2eUAAHodlRt";
- std::string Account = "nettyUser2";
- std::string pwd = "sunwin20211102";
- public:
- typedef std::shared_ptr<TCPClient> 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;
- };
- }
|