#ifndef HTTP_SERVER_H #define HTTP_SERVER_H #include #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; void http_callback_handler(Request *response); void httpEnterCallbackDefault(const HTTPParser &httpParser, const HttpSession::Ptr &session); void wsEnterCallbackDefault(const HttpSession::Ptr &httpSession, WebSocketFormat::WebSocketFrameType opcode, const std::string &payload); void closedCallbackDefault(const HttpSession::Ptr &session); virtual void configure(); virtual void initialize(); void main_loop(); HTTPServer(); virtual ~HTTPServer(); protected: std::map _request_map; std::mutex _request_map_mutex; }; #endif