simplify how the largest acked is passed to the ackhandler

This commit is contained in:
Marten Seemann
2019-08-21 14:40:38 +07:00
parent 2133d01956
commit 9221149194
6 changed files with 39 additions and 19 deletions

View File

@@ -11,14 +11,12 @@ import (
type Packet struct {
PacketNumber protocol.PacketNumber
PacketType protocol.PacketType
Ack *wire.AckFrame
Frames []wire.Frame
LargestAcked protocol.PacketNumber // InvalidPacketNumber if the packet doesn't contain an ACK
Length protocol.ByteCount
EncryptionLevel protocol.EncryptionLevel
SendTime time.Time
largestAcked protocol.PacketNumber // if the packet contains an ACK, the LargestAcked value of that ACK
// There are two reasons why a packet cannot be retransmitted:
// * it was already retransmitted
// * this packet is a retransmission, and we already received an ACK for the original packet