1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 18:32:44 +01:00
openrw/rwgame/debug/HttpServer.hpp
Daniel Evans 5461f1a5bb Improve debugger functionality and display
* Display Breakpoint information
* Current instruction is hilighted
2015-07-07 03:48:32 +01:00

30 lines
572 B
C++

#pragma once
#include "../RWGame.hpp"
#include <engine/GameWorld.hpp>
#include <SFML/Network/TcpListener.hpp>
#ifdef SFML_SYSTEM_WINDOWS
#include <winsock2.h>
#else
#include <sys/socket.h>
#endif
class HttpServer
{
public:
HttpServer(RWGame* game, GameWorld* world);
void run();
void handleBreakpoint(const SCMBreakpoint& bp);
private:
sf::TcpListener listener;
RWGame* game;
GameWorld* world;
bool paused;
const SCMBreakpoint* lastBreakpoint;
std::string dispatch(std::string method, std::string path);
std::string getState() const;
};