aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/conn.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/http/server/conn.cpp
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/conn.cpp')
-rw-r--r--library/cpp/http/server/conn.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/library/cpp/http/server/conn.cpp b/library/cpp/http/server/conn.cpp
index 38a76c4c30..dd0860a315 100644
--- a/library/cpp/http/server/conn.cpp
+++ b/library/cpp/http/server/conn.cpp
@@ -1,31 +1,31 @@
-#include "conn.h"
-
-#include <util/network/socket.h>
+#include "conn.h"
+
+#include <util/network/socket.h>
#include <util/stream/buffered.h>
-
-class THttpServerConn::TImpl {
-public:
+
+class THttpServerConn::TImpl {
+public:
inline TImpl(const TSocket& s, size_t outputBufferSize)
- : S_(s)
- , SI_(S_)
- , SO_(S_)
+ : S_(s)
+ , SI_(S_)
+ , SO_(S_)
, BO_(&SO_, outputBufferSize)
- , HI_(&SI_)
- , HO_(&BO_, &HI_)
- {
- }
-
+ , HI_(&SI_)
+ , HO_(&BO_, &HI_)
+ {
+ }
+
inline ~TImpl() {
- }
-
+ }
+
inline THttpInput* Input() noexcept {
- return &HI_;
- }
-
+ return &HI_;
+ }
+
inline THttpOutput* Output() noexcept {
- return &HO_;
- }
-
+ return &HO_;
+ }
+
inline void Reset() {
if (S_ != INVALID_SOCKET) {
// send RST packet to client
@@ -34,35 +34,35 @@ public:
}
}
-private:
- TSocket S_;
- TSocketInput SI_;
- TSocketOutput SO_;
- TBufferedOutput BO_;
- THttpInput HI_;
- THttpOutput HO_;
-};
-
-THttpServerConn::THttpServerConn(const TSocket& s)
+private:
+ TSocket S_;
+ TSocketInput SI_;
+ TSocketOutput SO_;
+ TBufferedOutput BO_;
+ THttpInput HI_;
+ THttpOutput HO_;
+};
+
+THttpServerConn::THttpServerConn(const TSocket& s)
: THttpServerConn(s, s.MaximumTransferUnit())
-{
-}
-
+{
+}
+
THttpServerConn::THttpServerConn(const TSocket& s, size_t outputBufferSize)
: Impl_(new TImpl(s, outputBufferSize))
{
}
THttpServerConn::~THttpServerConn() {
-}
-
+}
+
THttpInput* THttpServerConn::Input() noexcept {
- return Impl_->Input();
-}
-
+ return Impl_->Input();
+}
+
THttpOutput* THttpServerConn::Output() noexcept {
- return Impl_->Output();
-}
+ return Impl_->Output();
+}
void THttpServerConn::Reset() {
return Impl_->Reset();