HttpImp.h 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _HTTP_IMP_H_
  2. #define _HTTP_IMP_H_
  3. #include <map>
  4. #include <string>
  5. #include <vector>
  6. #include "servant/Application.h"
  7. using namespace std;
  8. using namespace tars;
  9. /////////////////////////////////////////////////////////////////////////
  10. class HttpImp : public Servant {
  11. public:
  12. /**
  13. * 构造函数
  14. */
  15. HttpImp();
  16. public:
  17. /**
  18. * 对象初始化
  19. */
  20. virtual void initialize();
  21. /**
  22. * 处理客户端的主动请求
  23. * @param current
  24. * @param response
  25. * @return int
  26. */
  27. virtual int doRequest(tars::CurrentPtr current, vector<char> &response);
  28. /**
  29. * 对象销毁
  30. */
  31. virtual void destroy();
  32. };
  33. ///////////////////////////////////////////////////////////////////////////////
  34. #endif