2015-04-19 22:33:33 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../RWGame.hpp"
|
|
|
|
#include <engine/GameWorld.hpp>
|
2016-06-22 11:13:41 +02:00
|
|
|
#include "TcpSocket.hpp"
|
2015-04-19 22:33:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
class HttpServer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HttpServer(RWGame* game, GameWorld* world);
|
|
|
|
void run();
|
|
|
|
|
2015-07-03 03:52:43 +02:00
|
|
|
void handleBreakpoint(const SCMBreakpoint& bp);
|
2015-04-19 22:33:33 +02:00
|
|
|
private:
|
2016-06-22 11:13:41 +02:00
|
|
|
TcpSocket socket;
|
2015-04-19 22:33:33 +02:00
|
|
|
RWGame* game;
|
|
|
|
GameWorld* world;
|
2015-07-03 03:52:43 +02:00
|
|
|
bool paused;
|
2015-07-07 04:48:32 +02:00
|
|
|
const SCMBreakpoint* lastBreakpoint;
|
2015-04-24 22:59:10 +02:00
|
|
|
|
2015-07-03 03:52:43 +02:00
|
|
|
std::string dispatch(std::string method, std::string path);
|
|
|
|
std::string getState() const;
|
2015-04-19 22:33:33 +02:00
|
|
|
};
|