| 455 | } |
| 456 | |
| 457 | inline void DoSendCycle(TCont* c) { |
| 458 | if (int ret = NCoro::ConnectI(c, S, P->RI->Addr)) { |
| 459 | ythrow TSystemError(ret) << "can't connect"; |
| 460 | } |
| 461 | SetNoDelay(S, true); |
| 462 | Executor()->Create<TLink, &TLink::RecvCycle>(this, "recv"); |
| 463 | |
| 464 | TVector<TRequestPtr> reqs; |
| 465 | TParts parts; |
| 466 | |
| 467 | while (Dequeue(P->Q, reqs, 7000)) { |
| 468 | for (size_t i = 0; i < reqs.size(); ++i) { |
| 469 | TRequestPtr& req = reqs[i]; |
| 470 | |
| 471 | req->Serialize(parts); |
| 472 | InFly[LocalGuid(req->Guid)] = req; |
| 473 | } |
| 474 | |
| 475 | { |
| 476 | TContIOVector vec(parts.data(), parts.size()); |
| 477 | NCoro::WriteVectorI(c, S, &vec); |
| 478 | } |
| 479 | |
| 480 | reqs.clear(); |
| 481 | parts.Clear(); |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | void RecvCycle(TCont* c) { |
| 486 | TIntrusivePtr<TLink> self(this); |
nothing calls this directly
no test coverage detected