new: uquic

This commit is contained in:
Gaukas Wang 2023-08-02 15:38:16 -06:00
parent 95f3eaaa66
commit ea40752ca3
No known key found for this signature in database
GPG key ID: 9E2F8986D76F8B5D
25 changed files with 1420 additions and 686 deletions

View file

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