MCPcopy Create free account
hub / github.com/catboost/catboost / operator()

Method operator()

library/cpp/neh/https.cpp:1635–1661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1633 }
1634
1635 inline void operator()(TCont* c) {
1636 try {
1637 TContBIOWatcher w(*IO_, c);
1638
1639 if (IO_->PollReadT(TDuration::Seconds(InputConnections()->UnusedConnKeepaliveTimeout()))) {
1640 IO_->Close(true);
1641 return;
1642 }
1643
1644 IO_->Handshake();
1645 THttpInput in(IO_.Get());
1646
1647 const char sym = *in.FirstLine().data();
1648
1649 if (sym == 'p' || sym == 'P') {
1650 Server_->OnRequest(new TPostRequest(in, IO_, Server_));
1651 } else {
1652 Server_->OnRequest(new TGetRequest(in, IO_, Server_));
1653 }
1654 } catch (...) {
1655 IO_->Close(false);
1656 }
1657
1658 if (SelfRemove) {
1659 delete this;
1660 }
1661 }
1662
1663 private:
1664 void DoRun(TCont* c) override {

Callers

nothing calls this directly

Calls 9

InputConnectionsFunction · 0.85
PollReadTMethod · 0.80
SecondsFunction · 0.50
CloseMethod · 0.45
HandshakeMethod · 0.45
GetMethod · 0.45
dataMethod · 0.45
OnRequestMethod · 0.45

Tested by

no test coverage detected