diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /library/cpp/http/server | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server')
-rw-r--r-- | library/cpp/http/server/http.cpp | 28 | ||||
-rw-r--r-- | library/cpp/http/server/http.h | 6 |
2 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd7..8d1900ef9e 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -22,7 +22,7 @@ #include <cerrno> #include <cstring> #include <ctime> - + #include <sys/stat.h> #include <sys/types.h> @@ -139,7 +139,7 @@ public: try { ((TImpl*)param)->ListenSocket(); } catch (...) { - + } return nullptr; @@ -149,7 +149,7 @@ public: THolder<TClientRequest> obj(Cb_->CreateClient()); obj->Conn_.Reset(c.Release()); - + return obj; } @@ -171,7 +171,7 @@ public: void SaveErrorCode() { ErrorCode = WSAGetLastError(); } - + int GetErrorCode() const { return ErrorCode; } @@ -218,7 +218,7 @@ public: ListenThread.Reset(nullptr); } } - + void Stop() { Shutdown(); @@ -309,7 +309,7 @@ public: Server_->AddRequestFromSocket(s, TInstant::Now(), SockAddrRef_); } - + SOCKET GetSocket() const noexcept { return S_; } @@ -338,13 +338,13 @@ public: return; } - + Requests->Start(Options_.nThreads, Options_.MaxQueueSize); FailRequests->Start(Options_.nFThreads, Options_.MaxFQueueSize); Cb_->OnListenStart(); ListenerRunningOK = true; ListenStartEvent.Signal(); - + TVector<void*> events; events.resize(1); @@ -378,7 +378,7 @@ public: Cb_->OnException(); } } - + while (!Reqs.Empty()) { THolder<TListenSocket> ls(Reqs.PopFront()); @@ -586,20 +586,20 @@ void TClientConnection::OnPollEvent(TInstant now) { return; } - } + } THolder<TClientRequest> obj(HttpServ_->CreateRequest(this_)); AcceptMoment = now; HttpServ_->AddRequest(obj, Reject_); -} - +} + void TClientConnection::Activate(TInstant now) noexcept { HttpServ_->Connections->Erase(this, now); LastUsed = now; ++ReceivedRequests; -} - +} + void TClientConnection::DeActivate() { HttpServ_->Connections->Add(this); } diff --git a/library/cpp/http/server/http.h b/library/cpp/http/server/http.h index b292d38f27..7fb210397c 100644 --- a/library/cpp/http/server/http.h +++ b/library/cpp/http/server/http.h @@ -1,5 +1,5 @@ #pragma once - + #include "conn.h" #include "options.h" @@ -97,8 +97,8 @@ private: private: THolder<TImpl> Impl_; -}; - +}; + /** * @deprecated Use TRequestReplier instead */ |