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

Method DoRecvCycle

library/cpp/neh/tcp.cpp:496–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494 }
495
496 inline void DoRecvCycle(TCont* c) {
497 TContIO io(S, c);
498 TBufferedInput input(&io, 8192 * 4);
499
500 while (true) {
501 ui32 len;
502 TGUID g;
503
504 try {
505 ::Load(&input, len);
506 } catch (TLoadEOF&) {
507 return;
508 }
509 ::Load(&input, g);
510 const TString data(LoadStroka(input, len - sizeof(g.dw)));
511
512 TInFly::iterator it = InFly.find(LocalGuid(g));
513
514 if (it == InFly.end()) {
515 continue;
516 }
517
518 TRequestPtr req = it->second;
519
520 InFly.erase(it);
521 req->Hndl->NotifyResponse(data);
522 }
523 }
524
525 inline TContExecutor* Executor() const noexcept {
526 return P->Q.Executor();

Callers

nothing calls this directly

Calls 7

LoadStrokaFunction · 0.85
LocalGuidFunction · 0.85
LoadFunction · 0.50
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
NotifyResponseMethod · 0.45

Tested by

no test coverage detected