diff options
author | gous32 <gous32@yandex-team.com> | 2024-04-10 09:48:27 +0300 |
---|---|---|
committer | gous32 <gous32@yandex-team.com> | 2024-04-10 09:57:42 +0300 |
commit | 1e986085fe84d3e9e16751d6bc590edba8b50b23 (patch) | |
tree | cf6139cdf45f2621c9586d98b246a35fdd562555 | |
parent | 446c5b32bc17a4ccab35973a9b8fb25291bf731e (diff) | |
download | ydb-1e986085fe84d3e9e16751d6bc590edba8b50b23.tar.gz |
DebugPrint for THttpServerOptions
ddffb1ebbc56036902fc8b93aac08ff45a8ef547
-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 05c954384a..5f10c42b8a 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 cacd7ebeda..f03bd5250e 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; |