mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
set the ACK frame delay time when generating the frame
This commit is contained in:
parent
2127e2f1de
commit
ee968aff67
6 changed files with 19 additions and 10 deletions
|
@ -227,6 +227,16 @@ var _ = Describe("receivedPacketHandler", func() {
|
|||
Expect(ack.HasMissingRanges()).To(BeFalse())
|
||||
})
|
||||
|
||||
It("sets the delay time", func() {
|
||||
err := handler.ReceivedPacket(1, time.Time{}, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
err = handler.ReceivedPacket(2, time.Now().Add(-1337*time.Millisecond), true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
ack := handler.GetAckFrame()
|
||||
Expect(ack).ToNot(BeNil())
|
||||
Expect(ack.DelayTime).To(BeNumerically("~", 1337*time.Millisecond, 50*time.Millisecond))
|
||||
})
|
||||
|
||||
It("saves the last sent ACK", func() {
|
||||
err := handler.ReceivedPacket(1, time.Time{}, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue