diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-04-16 09:11:59 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-04-16 09:11:59 +0000 |
commit | 25de1d521ca218e2b040739fea77a39e9fc543e9 (patch) | |
tree | 21521d8866cf1462dbd52c071cf369974c29650e /library/cpp/http/server | |
parent | bf444b8ed4d0f6bf17fd753e2cf88f9440012e87 (diff) | |
parent | 0a63d9ddc516f206f2b8745ce5e5dfa60190d755 (diff) | |
download | ydb-25de1d521ca218e2b040739fea77a39e9fc543e9.tar.gz |
Merge branch 'rightlib' into mergelibs-240416-0910
Diffstat (limited to 'library/cpp/http/server')
-rw-r--r-- | library/cpp/http/server/options.cpp | 16 | ||||
-rw-r--r-- | library/cpp/http/server/options.h | 4 | ||||
-rw-r--r-- | library/cpp/http/server/response.cpp | 1 |
3 files changed, 21 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; diff --git a/library/cpp/http/server/response.cpp b/library/cpp/http/server/response.cpp index 52d64c91ce..ff4d3e07f3 100644 --- a/library/cpp/http/server/response.cpp +++ b/library/cpp/http/server/response.cpp @@ -1,5 +1,6 @@ #include "response.h" +#include <util/generic/vector.h> #include <util/stream/output.h> #include <util/stream/mem.h> #include <util/string/cast.h> |