diff options
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/httpserver.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/zencore/include/zencore/httpserver.h b/zencore/include/zencore/httpserver.h index a0be54665..4a8cef262 100644 --- a/zencore/include/zencore/httpserver.h +++ b/zencore/include/zencore/httpserver.h @@ -300,25 +300,17 @@ private: * Implements the main event loop to service HTTP requests, and handles routing * requests to the appropriate endpoint handler as registered via AddEndpoint */ -class HttpServer +class HttpServer : public RefCounted { public: - HttpServer(); - ~HttpServer(); - - void AddEndpoint(const char* endpoint, std::function<void(HttpServerRequest&)> handler); - void AddEndpoint(HttpService& Service); - - void Initialize(int BasePort); - void Run(bool TestMode); - void RequestExit(); - -private: - struct Impl; - - RefPtr<Impl> m_Impl; + virtual void AddEndpoint(HttpService& Service) = 0; + virtual void Initialize(int BasePort) = 0; + virtual void Run(bool TestMode) = 0; + virtual void RequestExit() = 0; }; +Ref<HttpServer> CreateHttpServer(); + ////////////////////////////////////////////////////////////////////////// class HttpRouterRequest |