http_agent.h 871 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "http_define.h"
  3. #include "util/cache.h"
  4. #if USE_NET_HTTP_WEBSITE
  5. class http_agent_listener;
  6. class http_agent_extra;
  7. namespace ylib
  8. {
  9. namespace network
  10. {
  11. namespace http
  12. {
  13. class reqpack;
  14. class server;
  15. class agent :public ylib::error_base
  16. {
  17. public:
  18. agent();
  19. ~agent();
  20. bool start();
  21. void stop();
  22. void disconnect(bool ssl, uint64 connid);
  23. bool request(int32 wait_msec, reqpack* rp, network::http::proxy* proxy);
  24. private:
  25. void* get();
  26. private:
  27. void* m_agent_ssl;
  28. void* m_agent;
  29. http_agent_listener* m_listener;
  30. bool m_ssl;
  31. };
  32. }
  33. }
  34. }
  35. #endif