| 62 | } |
| 63 | |
| 64 | int TAckTracker::SelectPacket() { |
| 65 | if (!ResendQueue.empty()) { |
| 66 | int res = ResendQueue.back(); |
| 67 | ResendQueue.pop_back(); |
| 68 | //printf("resending packet %d\n", res); |
| 69 | return res; |
| 70 | } |
| 71 | if (CurrentPacket == PacketCount) { |
| 72 | return -1; |
| 73 | } |
| 74 | return CurrentPacket++; |
| 75 | } |
| 76 | |
| 77 | TAckTracker::~TAckTracker() { |
| 78 | for (TPacketHash::const_iterator i = PacketsInFly.begin(); i != PacketsInFly.end(); ++i) |