aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-13 14:46:49 +0200
committerGitHub <[email protected]>2023-10-13 14:46:49 +0200
commitc3fad0e98576ff5dee3ee63725459d46e201fa34 (patch)
tree91455786fac76ffb6a83ff24620329780ce08545 /src/zenhttp/include
parentimproved http.sys initialization diagnostics and amended logic for dedicated ... (diff)
downloadzen-c3fad0e98576ff5dee3ee63725459d46e201fa34.tar.xz
zen-c3fad0e98576ff5dee3ee63725459d46e201fa34.zip
support for multiple http servers (#473)
* added support for having multiple http servers active in one session * added configuration API to pluggable transports * removed pimpl pattern from some pluggable transports implementations
Diffstat (limited to 'src/zenhttp/include')
-rw-r--r--src/zenhttp/include/zenhttp/httpplugin.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/zenhttp/include/zenhttp/httpplugin.h b/src/zenhttp/include/zenhttp/httpplugin.h
index de54b9042..30a66e92e 100644
--- a/src/zenhttp/include/zenhttp/httpplugin.h
+++ b/src/zenhttp/include/zenhttp/httpplugin.h
@@ -3,7 +3,6 @@
#pragma once
#include <zencore/refcount.h>
-#include <zencore/thread.h>
#if !defined(ZEN_WITH_PLUGINS)
# if ZEN_PLATFORM_WINDOWS
@@ -19,31 +18,15 @@
namespace zen {
-struct HttpPluginServerImpl;
-
class HttpPluginServer : public HttpServer
{
public:
- HttpPluginServer(unsigned int ThreadCount);
- ~HttpPluginServer();
-
- virtual void RegisterService(HttpService& Service) override;
- virtual int Initialize(int BasePort) override;
- virtual void Run(bool IsInteractiveSession) override;
- virtual void RequestExit() override;
- virtual void Close() override;
-
- void AddPlugin(Ref<TransportPlugin> Plugin);
- void RemovePlugin(Ref<TransportPlugin> Plugin);
-
-private:
- Event m_ShutdownEvent;
- int m_BasePort = 0;
- unsigned int m_ThreadCount = 0;
-
- HttpPluginServerImpl* m_Impl = nullptr;
+ virtual void AddPlugin(Ref<TransportPlugin> Plugin) = 0;
+ virtual void RemovePlugin(Ref<TransportPlugin> Plugin) = 0;
};
+Ref<HttpPluginServer> CreateHttpPluginServer();
+
} // namespace zen
#endif