mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
30 lines
575 B
C++
30 lines
575 B
C++
#pragma once
|
|
#include "framework.h"
|
|
#include "LUAUtils.h"
|
|
|
|
using namespace web::http;
|
|
using namespace web::http::experimental::listener;
|
|
|
|
class UnitsFactory;
|
|
class Scheduler;
|
|
|
|
class RESTServer
|
|
{
|
|
public:
|
|
RESTServer(lua_State* L);
|
|
~RESTServer();
|
|
|
|
private:
|
|
std::thread* serverThread;
|
|
|
|
void handle_options(http_request request);
|
|
void handle_get(http_request request);
|
|
void handle_request(http_request request, function<void(json::value const&, json::value&)> action);
|
|
void handle_put(http_request request);
|
|
|
|
void task();
|
|
|
|
atomic<bool> runListener;
|
|
};
|
|
|