29 lines
463 B
C++
29 lines
463 B
C++
#ifndef HTTPSERVER_H
|
|
#define HTTPSERVER_H
|
|
|
|
#include "HttpPostData.h"
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
|
|
namespace Http {
|
|
|
|
class HttpServerImpl;
|
|
|
|
class HttpServer
|
|
{
|
|
public:
|
|
HttpServer(unsigned short port, std::function<std::string(const std::string&, const std::vector<HttpPostData>&)> callback);
|
|
~HttpServer();
|
|
|
|
void Wait();
|
|
|
|
private:
|
|
std::unique_ptr<HttpServerImpl> m_pHttpServerImpl;
|
|
};
|
|
|
|
} // namespace Http
|
|
|
|
#endif // HTTPSERVER_H
|