From 3de9a65cd990f2a4f5395b7e2a094471633eb98b Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 11 Dec 2025 09:34:24 +0100 Subject: HTTP server API changes for improved extensibility (#684) * refactored `HttpServer` so all subclass member functions are proctected, to make it easier to extend base functionality * added API service, can be used to enumerate registered endpoints (at `/api`). Currently only very basic information is provided --- src/zenhttp/servers/httpnull.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/zenhttp/servers/httpnull.cpp') diff --git a/src/zenhttp/servers/httpnull.cpp b/src/zenhttp/servers/httpnull.cpp index 9ac1c61ce..06838a0ed 100644 --- a/src/zenhttp/servers/httpnull.cpp +++ b/src/zenhttp/servers/httpnull.cpp @@ -19,20 +19,20 @@ HttpNullServer::~HttpNullServer() } void -HttpNullServer::RegisterService(HttpService& Service) +HttpNullServer::OnRegisterService(HttpService& Service) { ZEN_UNUSED(Service); } int -HttpNullServer::Initialize(int BasePort, std::filesystem::path DataDir) +HttpNullServer::OnInitialize(int BasePort, std::filesystem::path DataDir) { ZEN_UNUSED(DataDir); return BasePort; } void -HttpNullServer::Run(bool IsInteractiveSession) +HttpNullServer::OnRun(bool IsInteractiveSession) { const bool TestMode = !IsInteractiveSession; @@ -76,13 +76,13 @@ HttpNullServer::Run(bool IsInteractiveSession) } void -HttpNullServer::RequestExit() +HttpNullServer::OnRequestExit() { m_ShutdownEvent.Set(); } void -HttpNullServer::Close() +HttpNullServer::OnClose() { } -- cgit v1.2.3