openmw-tes3coop/apps/master/RestServer.hpp

32 lines
599 B
C++
Raw Normal View History

2017-05-19 16:02:12 +00:00
//
// Created by koncord on 13.05.17.
//
#ifndef NEWRESTAPI_RESTSERVER_HPP
#define NEWRESTAPI_RESTSERVER_HPP
#include <string>
#include <unordered_map>
#include "MasterServer.hpp"
#include "SimpleWeb/http_server.hpp"
typedef SimpleWeb::Server<SimpleWeb::HTTP> HttpServer;
class RestServer
{
public:
RestServer(unsigned short port, MasterServer::ServerMap *pMap);
void start();
void stop();
void cacheUpdated();
private:
HttpServer httpServer;
MasterServer::ServerMap *serverMap;
bool updatedCache = true;
2017-09-13 09:56:38 +00:00
std::thread thr;
2017-05-19 16:02:12 +00:00
};
#endif //NEWRESTAPI_RESTSERVER_HPP