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

Method GetPacketToSend

library/cpp/netliba/v12/net_acks.cpp:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 int TAckTracker::GetPacketToSend(float deltaT, bool* isCanceled) {
86 *isCanceled = IsCanceled;
87 if (IsCanceled) {
88 return -1;
89 }
90
91 int res = SelectPacket();
92 if (res == -1) {
93 // needed to count time even if we don't have anything to send
94 Congestion->ForceTimeAccount();
95 return res;
96 }
97 Congestion->LaunchPacket();
98 PacketsInFly[res] = -deltaT; // deltaT is time since last Step(), so for the timing to be correct we should subtract it
99 return res;
100 }
101
102 // called on SendTo() failure
103 void TAckTracker::AddToResend(int pkt) {

Callers 1

SendTransferPacketMethod · 0.45

Calls 2

ForceTimeAccountMethod · 0.45
LaunchPacketMethod · 0.45

Tested by

no test coverage detected