MCPcopy Create free account
hub / github.com/catboost/catboost / OnPollEvent

Method OnPollEvent

library/cpp/http/server/http.cpp:622–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void TClientConnection::OnPollEvent(TInstant now) {
623 THolder<TClientConnection> this_(this);
624 Activate(now);
625
626 {
627 char tmp[1];
628
629 if (::recv(Socket_, tmp, 1, MSG_PEEK) < 1) {
630 /*
631 * We can received a FIN so our socket was moved to
632 * TCP_CLOSE_WAIT state. Check it before adding work
633 * for this socket.
634 */
635
636 return;
637 }
638 }
639
640 THolder<TClientRequest> obj(HttpServ_->CreateRequest(this_));
641 AcceptMoment = now;
642
643 HttpServ_->AddRequest(obj, Reject_);
644}
645
646void TClientConnection::Activate(TInstant now) noexcept {
647 HttpServ_->Connections->Erase(this, now);

Callers 1

ListenSocketMethod · 0.45

Calls 2

CreateRequestMethod · 0.80
AddRequestMethod · 0.45

Tested by

no test coverage detected