diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/http/server/conn.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/conn.h')
-rw-r--r-- | library/cpp/http/server/conn.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/http/server/conn.h b/library/cpp/http/server/conn.h index 3aa5329af4..93c2358c23 100644 --- a/library/cpp/http/server/conn.h +++ b/library/cpp/http/server/conn.h @@ -1,37 +1,37 @@ -#pragma once - +#pragma once + #include <library/cpp/http/io/stream.h> -#include <util/generic/ptr.h> - -class TSocket; - -/// Потоки ввода/вывода для получения запросов и отправки ответов HTTP-сервера. -class THttpServerConn { -public: - explicit THttpServerConn(const TSocket& s); - THttpServerConn(const TSocket& s, size_t outputBufferSize); +#include <util/generic/ptr.h> + +class TSocket; + +/// Потоки ввода/вывода для получения запросов и отправки ответов HTTP-сервера. +class THttpServerConn { +public: + explicit THttpServerConn(const TSocket& s); + THttpServerConn(const TSocket& s, size_t outputBufferSize); ~THttpServerConn(); - + THttpInput* Input() noexcept; THttpOutput* Output() noexcept; - + inline const THttpInput* Input() const noexcept { - return const_cast<THttpServerConn*>(this)->Input(); - } - + return const_cast<THttpServerConn*>(this)->Input(); + } + inline const THttpOutput* Output() const noexcept { - return const_cast<THttpServerConn*>(this)->Output(); - } - - /// Проверяет, можно ли установить режим, при котором соединение с сервером - /// не завершается после окончания транзакции. + return const_cast<THttpServerConn*>(this)->Output(); + } + + /// Проверяет, можно ли установить режим, при котором соединение с сервером + /// не завершается после окончания транзакции. inline bool CanBeKeepAlive() const noexcept { - return Output()->CanBeKeepAlive(); - } - + return Output()->CanBeKeepAlive(); + } + void Reset(); -private: - class TImpl; - THolder<TImpl> Impl_; -}; +private: + class TImpl; + THolder<TImpl> Impl_; +}; |