aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/httpserver.cpp')
-rw-r--r--src/zenhttp/httpserver.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp
index 1357f1b9b..e529fb76e 100644
--- a/src/zenhttp/httpserver.cpp
+++ b/src/zenhttp/httpserver.cpp
@@ -990,6 +990,49 @@ HttpRequestRouter::HandleRequest(zen::HttpServerRequest& Request)
//////////////////////////////////////////////////////////////////////////
+int
+HttpServer::Initialize(int BasePort, std::filesystem::path DataDir)
+{
+ return OnInitialize(BasePort, std::move(DataDir));
+}
+
+void
+HttpServer::Run(bool IsInteractiveSession)
+{
+ OnRun(IsInteractiveSession);
+}
+
+void
+HttpServer::RequestExit()
+{
+ OnRequestExit();
+}
+void
+HttpServer::Close()
+{
+ OnClose();
+}
+
+void
+HttpServer::RegisterService(HttpService& Service)
+{
+ OnRegisterService(Service);
+ m_KnownServices.push_back(&Service);
+}
+
+void
+HttpServer::EnumerateServices(std::function<void(HttpService& Service)>&& Callback)
+{
+ // This doesn't take a lock because services should only be registered during
+ // server initialization, before it starts accepting requests
+ for (HttpService* Service : m_KnownServices)
+ {
+ Callback(*Service);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+
HttpRpcHandler::HttpRpcHandler()
{
}