uquic/internal/wire/ack_range.go
Marten Seemann 5c98332e90 implement ACK decimation
ACK generation closely follows Chrome's QuicConnection::MaybeQueueAck()
in ACK_DECIMATION_WITH_REORDERING mode.
2018-03-05 19:56:19 +07:00

14 lines
332 B
Go

package wire
import "github.com/lucas-clemente/quic-go/internal/protocol"
// AckRange is an ACK range
type AckRange struct {
First protocol.PacketNumber
Last protocol.PacketNumber
}
// Len returns the number of packets contained in this ACK range
func (r AckRange) Len() protocol.PacketNumber {
return r.Last - r.First + 1
}