diff options
Diffstat (limited to 'src/zenhttp/servers')
| -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 |