keep track of which packets were sent as retransmissions

When an ACK for a packet that was retransmitted arrives, we don't need
to retransmit the retransmission, even if it was lost.
This commit is contained in:
Marten Seemann
2018-03-14 12:18:54 +01:00
parent 56720edc34
commit fed3bf503e
8 changed files with 415 additions and 71 deletions

View File

@@ -18,6 +18,11 @@ type Packet struct {
largestAcked protocol.PacketNumber // if the packet contains an ACK, the LargestAcked value of that ACK
sendTime time.Time
queuedForRetransmission bool
retransmittedAs []protocol.PacketNumber
isRetransmission bool // we need a separate bool here because 0 is a valid packet number
retransmissionOf protocol.PacketNumber
}
// GetFramesForRetransmission gets all the frames for retransmission