Line data Source code
1 : #pragma once 2 : 3 : #include <httplib.h> 4 : 5 : namespace Com { 6 0 : class HTTPServer { 7 : int port; 8 : 9 : httplib::Server svr; 10 : 11 : void helloGet(const httplib::Request &req, httplib::Response &res); 12 : void staticSimulationPost(const httplib::Request &req, httplib::Response &res); 13 : void staticSimulationJoinGet(const httplib::Request &req, httplib::Response &res); 14 : 15 : void dynamicSimulationPost(const httplib::Request &req, httplib::Response &res); 16 : 17 : public: 18 : HTTPServer(int port); 19 : void loop(); 20 : }; 21 : } // namespace Com