github.com/tumi8/quic-go@v0.37.4-tum/noninternal/ackhandler/ackhandler.go (about) 1 package ackhandler 2 3 import ( 4 "github.com/tumi8/quic-go/noninternal/protocol" 5 "github.com/tumi8/quic-go/noninternal/utils" 6 "github.com/tumi8/quic-go/logging" 7 ) 8 9 // NewAckHandler creates a new SentPacketHandler and a new ReceivedPacketHandler. 10 // clientAddressValidated indicates whether the address was validated beforehand by an address validation token. 11 // clientAddressValidated has no effect for a client. 12 func NewAckHandler( 13 initialPacketNumber protocol.PacketNumber, 14 initialMaxDatagramSize protocol.ByteCount, 15 rttStats *utils.RTTStats, 16 clientAddressValidated bool, 17 pers protocol.Perspective, 18 tracer logging.ConnectionTracer, 19 logger utils.Logger, 20 ) (SentPacketHandler, ReceivedPacketHandler) { 21 sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, pers, tracer, logger) 22 return sph, newReceivedPacketHandler(sph, rttStats, logger) 23 }