2022-01-07 20:11:06 +01:00
|
|
|
#ifndef WEB_SERVER_H
|
|
|
|
#define WEB_SERVER_H
|
|
|
|
|
|
|
|
#include "core/nodes/node_tree.h"
|
|
|
|
|
|
|
|
class Request;
|
2022-01-08 11:58:35 +01:00
|
|
|
class WebNode;
|
2022-01-07 20:11:06 +01:00
|
|
|
|
|
|
|
class WebServer : public NodeTree {
|
|
|
|
RCPP_OBJECT(WebServer, NodeTree);
|
|
|
|
|
|
|
|
public:
|
2022-01-08 11:58:35 +01:00
|
|
|
WebNode *get_web_root();
|
2022-01-07 20:11:06 +01:00
|
|
|
|
|
|
|
void set_root(Node *root);
|
|
|
|
|
|
|
|
void handle_request(Request *request);
|
|
|
|
|
2022-02-10 17:01:57 +01:00
|
|
|
float get_update_delta_time();
|
|
|
|
|
2022-01-07 20:11:06 +01:00
|
|
|
WebServer();
|
|
|
|
virtual ~WebServer();
|
|
|
|
|
|
|
|
protected:
|
2022-01-08 11:58:35 +01:00
|
|
|
WebNode *_web_root;
|
2022-02-10 16:59:31 +01:00
|
|
|
float _update_interval;
|
2022-01-07 20:11:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|