http_agent.h 847 B

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