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

Method SendData

library/cpp/neh/http2.cpp:1799–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1797
1798 private:
1799 void SendData(TAtomicBase requestId, TTcpSocket::TSendedData sd) {
1800 TContIOVector& vec = *sd->GetIOvec();
1801
1802 if (requestId != AtomicGet(PrimaryResponse_)) {
1803 // already has another request for response first, so push this to queue
1804 // + enqueue event for safe checking queue (at local/transport thread)
1805 TResponseDataRef rdr = new TResponseData(requestId, sd);
1806 ResponsesDataQueue_.Enqueue(rdr);
1807 AS_->GetIOService().Post(std::bind(&TConn::ProcessResponsesData, SelfRef()));
1808 return;
1809 }
1810 if (THttp2Options::ServerUseDirectWrite) {
1811 vec.Proceed(AS_->WriteSome(vec));
1812 }
1813 if (!vec.Complete()) {
1814 DBGOUT("AsyncWrite()");
1815 AS_->AsyncWrite(sd, std::bind(&TConn::OnSend, SelfRef(), _1, _2, _3), THttp2Options::ServerOutputDeadline);
1816 } else {
1817 // run ProcessPipeline at safe thread
1818 AS_->GetIOService().Post(std::bind(&TConn::ProcessPipeline, SelfRef()));
1819 }
1820 }
1821
1822 void OnSend(const TErrorCode& ec, size_t amount, IHandlingContext&) {
1823 Y_UNUSED(amount);

Callers

nothing calls this directly

Calls 8

CompleteMethod · 0.80
AtomicGetFunction · 0.50
GetIOvecMethod · 0.45
EnqueueMethod · 0.45
PostMethod · 0.45
ProceedMethod · 0.45
WriteSomeMethod · 0.45
AsyncWriteMethod · 0.45

Tested by

no test coverage detected