diff options
| -rw-r--r-- | library/cpp/http/server/options.cpp | 16 | ||||
| -rw-r--r-- | library/cpp/http/server/options.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/library/cpp/http/server/options.cpp b/library/cpp/http/server/options.cpp index 05c954384a2..5f10c42b8a0 100644 --- a/library/cpp/http/server/options.cpp +++ b/library/cpp/http/server/options.cpp @@ -1,5 +1,6 @@ #include "options.h" +#include <util/stream/output.h> #include <util/string/cast.h> #include <util/digest/numeric.h> #include <util/network/ip.h> @@ -41,3 +42,18 @@ void THttpServerOptions::BindAddresses(TBindAddresses& ret) const { ret.push_back(Host ? TNetworkAddress(Host, Port) : TNetworkAddress(Port)); } } + +void THttpServerOptions::DebugPrint(IOutputStream& stream) const noexcept { + stream << "Port: " << Port << "\n"; + stream << "Host: " << Host << "\n"; + stream << "KeepAliveEnabled: " << KeepAliveEnabled << "\n"; + stream << "CompressionEnabled: " << CompressionEnabled << "\n"; + stream << "nThreads: " << nThreads << "\n"; + stream << "nListenerThreads: " << nListenerThreads << "\n"; + stream << "MaxQueueSize: " << MaxQueueSize << "\n"; + stream << "nFThreads: " << nFThreads << "\n"; + stream << "MaxFQueueSize: " << MaxFQueueSize << "\n"; + stream << "MaxConnections: " << MaxConnections << "\n"; + stream << "MaxRequestsPerConnection: " << MaxRequestsPerConnection << "\n"; + stream << "ClientTimeout(ms): " << ClientTimeout.MilliSeconds() << "\n"; +} diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h index cacd7ebedaf..f03bd5250e5 100644 --- a/library/cpp/http/server/options.h +++ b/library/cpp/http/server/options.h @@ -8,6 +8,8 @@ #include <util/generic/vector.h> #include <util/datetime/base.h> +class IOutputStream; + class THttpServerOptions { public: inline THttpServerOptions(ui16 port = 17000) noexcept @@ -151,6 +153,8 @@ public: return *this; } + void DebugPrint(IOutputStream& stream) const noexcept; + struct TAddr { TString Addr; ui16 Port; |
