aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpnull.h
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-09 16:29:24 +0200
committerStefan Boberg <[email protected]>2021-09-09 16:29:24 +0200
commita73862b954209fd1adce0f07b8f80b8cf27f2486 (patch)
tree07f2898998f884e871c47a2979dfb01434443584 /zenhttp/httpnull.h
parentFactored out http server related code into zenhttp module since it feels out ... (diff)
downloadzen-a73862b954209fd1adce0f07b8f80b8cf27f2486.tar.xz
zen-a73862b954209fd1adce0f07b8f80b8cf27f2486.zip
Added compile time logic to toggle http.sys / null http implementation on/off
Diffstat (limited to 'zenhttp/httpnull.h')
-rw-r--r--zenhttp/httpnull.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/zenhttp/httpnull.h b/zenhttp/httpnull.h
new file mode 100644
index 000000000..9cec33c98
--- /dev/null
+++ b/zenhttp/httpnull.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <zenhttp/httpserver.h>
+#include <zencore/thread.h>
+
+namespace zen {
+
+/**
+ * @brief Null implementation of "http" server. Does nothing
+*/
+
+class HttpNullServer : public HttpServer
+{
+public:
+ HttpNullServer();
+ ~HttpNullServer();
+
+ virtual void RegisterService(HttpService& Service) override;
+ virtual void Initialize(int BasePort) override;
+ virtual void Run(bool TestMode) override;
+ virtual void RequestExit() override;
+
+private:
+ Event m_ShutdownEvent;
+};
+
+} // namespace zen