mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use the same packet number space for received 0-RTT and 1-RTT packets
This commit is contained in:
parent
b25b2f6921
commit
d6b50cf15a
2 changed files with 19 additions and 7 deletions
|
@ -48,6 +48,16 @@ var _ = Describe("Received Packet Handler", func() {
|
|||
Expect(oneRTTAck.DelayTime).To(BeNumerically("~", time.Second, 50*time.Millisecond))
|
||||
})
|
||||
|
||||
It("uses the same packet number space for 0-RTT and 1-RTT packets", func() {
|
||||
sendTime := time.Now().Add(-time.Second)
|
||||
handler.ReceivedPacket(2, protocol.Encryption0RTT, sendTime, true)
|
||||
handler.ReceivedPacket(3, protocol.Encryption1RTT, sendTime, true)
|
||||
ack := handler.GetAckFrame(protocol.Encryption1RTT)
|
||||
Expect(ack).ToNot(BeNil())
|
||||
Expect(ack.AckRanges).To(HaveLen(1))
|
||||
Expect(ack.AckRanges[0]).To(Equal(wire.AckRange{Smallest: 2, Largest: 3}))
|
||||
})
|
||||
|
||||
It("drops Initial packets", func() {
|
||||
sendTime := time.Now().Add(-time.Second)
|
||||
handler.ReceivedPacket(2, protocol.EncryptionInitial, sendTime, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue