HttpServer.h 463 B

12345678910111213141516171819202122232425262728
  1. #ifndef HTTPSERVER_H
  2. #define HTTPSERVER_H
  3. #include "HttpPostData.h"
  4. #include <functional>
  5. #include <memory>
  6. #include <vector>
  7. namespace Http {
  8. class HttpServerImpl;
  9. class HttpServer
  10. {
  11. public:
  12. HttpServer(unsigned short port, std::function<std::string(const std::string&, const std::vector<HttpPostData>&)> callback);
  13. ~HttpServer();
  14. void Wait();
  15. private:
  16. std::unique_ptr<HttpServerImpl> m_pHttpServerImpl;
  17. };
  18. } // namespace Http
  19. #endif // HTTPSERVER_H