github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/internal/wire/ack_range.go (about) 1 package wire 2 3 import "github.com/TugasAkhir-QUIC/quic-go/internal/protocol" 4 5 // AckRange is an ACK range 6 type AckRange struct { 7 Smallest protocol.PacketNumber 8 Largest protocol.PacketNumber 9 } 10 11 // Len returns the number of packets contained in this ACK range 12 func (r AckRange) Len() protocol.PacketNumber { 13 return r.Largest - r.Smallest + 1 14 }