Deep RTS
Webserver.h
Go to the documentation of this file.
1//
2// Created by per on 18.10.2020.
3//
4
5#ifndef HORIZON_WEBSERVER_H
6#define HORIZON_WEBSERVER_H
7
8
9#include <memory>
10#include <functional>
11#include <string>
12namespace drogon{
13 class HttpRequest;
14 class HttpResponse;
15}
16
17class AppSettings;
18class AI;
19
20class Webserver {
21 const std::string host;
22 const int port;
23 const bool development;
24
25public:
26 Webserver(const std::string& _host, int _port, bool development);
27 void start();
28 void handle(const std::shared_ptr<drogon::HttpRequest> &req,
29 std::function<void(const std::shared_ptr<drogon::HttpResponse> &)> &&callback, int p1,
30 const std::string&p2, const std::string &p3, int p4) const;
31};
32
33
34#endif //HORIZON_WEBSERVER_H
Definition: Webserver.h:20
void handle(const std::shared_ptr< drogon::HttpRequest > &req, std::function< void(const std::shared_ptr< drogon::HttpResponse > &)> &&callback, int p1, const std::string &p2, const std::string &p3, int p4) const
Definition: Webserver.cpp:80
void start()
Definition: Webserver.cpp:23
Webserver(const std::string &_host, int _port, bool development)
Definition: Webserver.cpp:15
Definition: Webserver.h:12