| 517 | } |
| 518 | |
| 519 | void GetPendingDataSize(TRequesterPendingDataStats* res) override { |
| 520 | *res = PendingDataStats; |
| 521 | #ifndef NDEBUG |
| 522 | TRequesterPendingDataStats chk; |
| 523 | for (TUdpOutXferHash::const_iterator i = SendQueue.begin(); i != SendQueue.end(); ++i) { |
| 524 | TRopeDataPacket* pckt = i->second.Data.Get(); |
| 525 | if (pckt) { |
| 526 | chk.OutDataSize += pckt->GetSize(); |
| 527 | ++chk.OutCount; |
| 528 | } |
| 529 | } |
| 530 | for (TUdpInXferHash::const_iterator i = RecvQueue.begin(); i != RecvQueue.end(); ++i) { |
| 531 | const TUdpInTransfer& tr = i->second; |
| 532 | for (int p = 0; p < tr.GetPacketCount(); ++p) { |
| 533 | if (tr.GetPacket(p)) { |
| 534 | chk.InpDataSize += tr.PacketSize; |
| 535 | } |
| 536 | } |
| 537 | ++chk.InpCount; |
| 538 | } |
| 539 | Y_ASSERT(memcmp(&chk, res, sizeof(chk)) == 0); |
| 540 | #endif |
| 541 | } |
| 542 | TString GetDebugInfo() override; |
| 543 | TString GetPeerLinkDebug(const TPeerLinkHash& ch); |
| 544 | void Kill(const TUdpAddress& addr) override; |