HelloServer.h 685 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef __HelloServer_H_
  2. #define __HelloServer_H_
  3. #include <iostream>
  4. #include "servant/Application.h"
  5. #include "PushThread.h"
  6. using namespace tars;
  7. extern string g_HelloServerObj;
  8. extern string g_TransDstServerObj;
  9. extern atomic<int> g_handleDestroy;
  10. class HelloServer : public Application, public TC_Thread
  11. {
  12. public:
  13. HelloServer() {}
  14. virtual ~HelloServer() {}
  15. /**
  16. * 服务初始化
  17. **/
  18. virtual void initialize();
  19. /**
  20. * 服务销毁
  21. **/
  22. virtual void destroyApp();
  23. protected:
  24. virtual void run();
  25. private:
  26. //用于push消息的线程
  27. PushInfoThread *pushThread;
  28. };
  29. ////////////////////////////////////////////
  30. #endif