github.com/daeuniverse/quic-go@v0.0.0-20240413031024-943f218e0810/internal/ackhandler/ackhandler.go (about) 1 package ackhandler 2 3 import ( 4 "github.com/daeuniverse/quic-go/internal/protocol" 5 "github.com/daeuniverse/quic-go/internal/utils" 6 "github.com/daeuniverse/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 enableECN bool, 18 pers protocol.Perspective, 19 tracer *logging.ConnectionTracer, 20 logger utils.Logger, 21 ) (SentPacketHandler, ReceivedPacketHandler) { 22 sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, enableECN, pers, tracer, logger) 23 return sph, newReceivedPacketHandler(sph, logger) 24 }