uquic/internal/ackhandler/u_ackhandler.go
2023-10-26 22:48:59 -06:00

24 lines
775 B
Go

package ackhandler
import (
"github.com/refraction-networking/uquic/internal/protocol"
"github.com/refraction-networking/uquic/internal/utils"
"github.com/refraction-networking/uquic/logging"
)
// [UQUIC]
func NewUAckHandler(
initialPacketNumber protocol.PacketNumber,
initialMaxDatagramSize protocol.ByteCount,
rttStats *utils.RTTStats,
clientAddressValidated bool,
enableECN bool,
pers protocol.Perspective,
tracer *logging.ConnectionTracer,
logger utils.Logger,
) (SentPacketHandler, ReceivedPacketHandler) {
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, enableECN, pers, tracer, logger)
return &uSentPacketHandler{
sentPacketHandler: sph,
}, newReceivedPacketHandler(sph, rttStats, logger)
}