123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #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>
- using namespace std;
- using namespace toolkit;
- #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 "Player/PlayerProxy.h"
- #include "Rtmp/RtmpPusher.h"
- #include "Common/config.h"
- #include "Pusher/MediaPusher.h"
- #include "Extension/Frame.h"
- #include "Util/SqlPool.h"
- #include "Network/TcpClient.h"
- #include "Poller/Timer.h"
- 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;
- };
- }
|