mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
new: uquic
This commit is contained in:
parent
95f3eaaa66
commit
ea40752ca3
25 changed files with 1420 additions and 686 deletions
|
@ -96,8 +96,6 @@ type sentPacketHandler struct {
|
|||
|
||||
tracer logging.ConnectionTracer
|
||||
logger utils.Logger
|
||||
|
||||
initialPacketNumberLength protocol.PacketNumberLen // [UQUIC]
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -138,12 +136,6 @@ func newSentPacketHandler(
|
|||
}
|
||||
}
|
||||
|
||||
func SetInitialPacketNumberLength(h SentPacketHandler, pnLen protocol.PacketNumberLen) {
|
||||
if sph, ok := h.(*sentPacketHandler); ok {
|
||||
sph.initialPacketNumberLength = pnLen
|
||||
}
|
||||
}
|
||||
|
||||
func (h *sentPacketHandler) removeFromBytesInFlight(p *packet) {
|
||||
if p.includedInBytesInFlight {
|
||||
if p.Length > h.bytesInFlight {
|
||||
|
@ -725,11 +717,6 @@ func (h *sentPacketHandler) PeekPacketNumber(encLevel protocol.EncryptionLevel)
|
|||
pn := pnSpace.pns.Peek()
|
||||
// See section 17.1 of RFC 9000.
|
||||
|
||||
// [UQUIC] This kinda breaks PN length mimicry.
|
||||
if encLevel == protocol.EncryptionInitial && h.initialPacketNumberLength != 0 {
|
||||
return pn, h.initialPacketNumberLength
|
||||
}
|
||||
|
||||
return pn, protocol.GetPacketNumberLengthForHeader(pn, pnSpace.largestAcked)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue