#ifndef HTTP_SERVER_H #define HTTP_SERVER_H #include #include #include #include #include #include #include #include #include #include using namespace brynet; using namespace brynet::net; using namespace brynet::net::http; class Request; class HTTPServer { public: int port; int threads; std::shared_ptr service; wrapper::HttpListenerBuilder *listenBuilder; static void http_callback_handler(Request *response); static void httpEnterCallbackDefault(const HTTPParser &httpParser, const HttpSession::Ptr &session); static void wsEnterCallbackDefault(const HttpSession::Ptr &httpSession, WebSocketFormat::WebSocketFrameType opcode, const std::string &payload); static void closedCallbackDefault(const HttpSession::Ptr &session); virtual void configure(); virtual void initialize(); void main_loop(); HTTPServer(); virtual ~HTTPServer(); protected: static std::map _request_map; }; #endif