diff options
| author | Tomasz Obrębski <[email protected]> | 2025-12-19 18:55:00 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-12-19 18:55:00 +0100 |
| commit | b01ad05dcf31c131f25438ca7df3708f0ddd47b4 (patch) | |
| tree | 52b65394418c475fd13312fc46aad3cab0413076 /src/zenhttp/servers/httpplugin.cpp | |
| parent | Merge pull request #696 from ue-foundation/zs/limit-overwrite-default (diff) | |
| download | zen-b01ad05dcf31c131f25438ca7df3708f0ddd47b4.tar.xz zen-b01ad05dcf31c131f25438ca7df3708f0ddd47b4.zip | |
Add base port getter and set the dll directory for plugin dependencies (#692)
* Add base port getter and set the dll directory for plugin dependencies
* Use UTF8 for dll paths
* Rename BasePort to m_BasePort for consistency
Diffstat (limited to 'src/zenhttp/servers/httpplugin.cpp')
| -rw-r--r-- | src/zenhttp/servers/httpplugin.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/zenhttp/servers/httpplugin.cpp b/src/zenhttp/servers/httpplugin.cpp index 44a5b71d0..7ee4c6e62 100644 --- a/src/zenhttp/servers/httpplugin.cpp +++ b/src/zenhttp/servers/httpplugin.cpp @@ -120,12 +120,14 @@ struct HttpPluginServerImpl : public HttpPluginServer, TransportServer bool m_IsRequestLoggingEnabled = false; LoggerRef m_RequestLog; std::atomic_uint32_t m_ConnectionIdCounter{0}; + int m_BasePort; HttpServerTracer m_RequestTracer; // TransportServer virtual TransportServerConnection* CreateConnectionHandler(TransportConnection* Connection) override; + virtual int GetBasePort() const override; }; /** This is the class which request handlers interface with when @@ -707,12 +709,19 @@ HttpPluginServerImpl::CreateConnectionHandler(TransportConnection* Connection) } int -HttpPluginServerImpl::OnInitialize(int BasePort, std::filesystem::path DataDir) +HttpPluginServerImpl::GetBasePort() const +{ + return m_BasePort; +} + +int +HttpPluginServerImpl::OnInitialize(int InBasePort, std::filesystem::path DataDir) { ZEN_TRACE_CPU("HttpPluginServerImpl::Initialize"); ZEN_MEMSCOPE(GetHttppluginTag()); m_RequestTracer.Initialize(DataDir); + m_BasePort = InBasePort; try { @@ -737,7 +746,7 @@ HttpPluginServerImpl::OnInitialize(int BasePort, std::filesystem::path DataDir) m_IsInitialized = true; - return BasePort; + return m_BasePort; } void |