diff options
| author | Stefan Boberg <[email protected]> | 2021-05-13 23:12:07 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-05-13 23:12:07 +0200 |
| commit | f5c03516a236a3939dda53d7a8d3f10ed8f11ee8 (patch) | |
| tree | f00748b7be26e426e815c471f5fb23e180494f4f /zencore/include | |
| parent | Removed a const which upsets VS 16.9.5 for whatever reason (diff) | |
| download | zen-f5c03516a236a3939dda53d7a8d3f10ed8f11ee8.tar.xz zen-f5c03516a236a3939dda53d7a8d3f10ed8f11ee8.zip | |
HTTP: added some basic comments to httpserver.h
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/httpserver.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/zencore/include/zencore/httpserver.h b/zencore/include/zencore/httpserver.h index 2f566b858..d07eba339 100644 --- a/zencore/include/zencore/httpserver.h +++ b/zencore/include/zencore/httpserver.h @@ -2,16 +2,18 @@ #pragma once +#include "zencore.h" + #include <zencore/enumflags.h> #include <zencore/refcount.h> #include <zencore/string.h> + #include <functional> #include <gsl/gsl-lite.hpp> #include <list> #include <regex> #include <span> #include <unordered_map> -#include "zencore.h" namespace zen { @@ -259,6 +261,13 @@ private: uint32_t m_ErrorCode; }; +/** + * Base class for implementing an HTTP "service" + * + * A service exposes one or more endpoints with a certain URI prefix + * + */ + class HttpService { public: @@ -278,6 +287,9 @@ private: }; /** HTTP server + * + * Implements the main event loop to service HTTP requests, and handles routing + * requests to the appropriate endpoint handler as registered via AddEndpoint */ class HttpServer { @@ -327,6 +339,13 @@ HttpRouterRequest::GetCapture(int Index) const ////////////////////////////////////////////////////////////////////////// +/** HTTP request router helper + * + * This helper class allows a service implementer to register one or more + * endpoints using pattern matching (currently using regex matching) + * + */ + class HttpRequestRouter { public: |