TestRecvThread.h 482 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __TEST_RECV_THREAD_H
  2. #define __TEST_RECV_THREAD_H
  3. #include "servant/Application.h"
  4. class TestPushCallBack : public ServantProxyCallback
  5. {
  6. public:
  7. virtual int onDispatch(ReqMessagePtr msg);
  8. };
  9. typedef tars::TC_AutoPtr<TestPushCallBack> TestPushCallBackPtr;
  10. class RecvThread : public TC_Thread, public TC_ThreadLock
  11. {
  12. public:
  13. RecvThread(int second);
  14. virtual void run();
  15. private:
  16. int _second;
  17. bool _bTerminate;
  18. Communicator _comm;
  19. ServantPrx _prx;
  20. };
  21. #endif