mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
increase the packet size of the client's Initial packet
This commit is contained in:
parent
f926945ae5
commit
2e46110d60
2 changed files with 12 additions and 8 deletions
|
@ -403,7 +403,8 @@ var _ = Describe("Packet packer", func() {
|
|||
p, err := packer.PackConnectionClose(qerr.NewApplicationError(0x1337, "test error"))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(p.packets).To(HaveLen(2))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeNumerically(">=", protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(maxPacketSize))
|
||||
Expect(p.packets[0].header.Type).To(Equal(protocol.PacketTypeInitial))
|
||||
Expect(p.packets[0].header.PacketNumber).To(Equal(protocol.PacketNumber(1)))
|
||||
Expect(p.packets[0].frames).To(HaveLen(1))
|
||||
|
@ -880,7 +881,8 @@ var _ = Describe("Packet packer", func() {
|
|||
expectAppendStreamFrames(ackhandler.Frame{Frame: &wire.StreamFrame{Data: []byte("foobar")}})
|
||||
p, err := packer.PackCoalescedPacket(protocol.MaxByteCount)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(p.buffer.Data).To(HaveLen(protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeNumerically(">=", protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(maxPacketSize))
|
||||
Expect(p.packets).To(HaveLen(2))
|
||||
Expect(p.packets[0].EncryptionLevel()).To(Equal(protocol.EncryptionInitial))
|
||||
Expect(p.packets[0].frames).To(HaveLen(1))
|
||||
|
@ -1128,7 +1130,8 @@ var _ = Describe("Packet packer", func() {
|
|||
packer.perspective = protocol.PerspectiveClient
|
||||
p, err := packer.PackCoalescedPacket(protocol.MaxByteCount)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeNumerically(">=", protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(maxPacketSize))
|
||||
Expect(p.packets).To(HaveLen(1))
|
||||
Expect(p.packets[0].header.Token).To(Equal(token))
|
||||
Expect(p.packets[0].frames).To(HaveLen(1))
|
||||
|
@ -1155,7 +1158,7 @@ var _ = Describe("Packet packer", func() {
|
|||
Expect(p.packets).To(HaveLen(1))
|
||||
Expect(p.packets[0].ack).To(Equal(ack))
|
||||
Expect(p.packets[0].frames).To(HaveLen(1))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(protocol.MinInitialPacketSize))
|
||||
Expect(p.buffer.Len()).To(BeEquivalentTo(maxPacketSize))
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1193,7 +1196,8 @@ var _ = Describe("Packet packer", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(packet).ToNot(BeNil())
|
||||
Expect(packet.EncryptionLevel()).To(Equal(protocol.EncryptionInitial))
|
||||
Expect(packet.buffer.Len()).To(BeEquivalentTo(protocol.MinInitialPacketSize))
|
||||
Expect(packet.buffer.Len()).To(BeNumerically(">=", protocol.MinInitialPacketSize))
|
||||
Expect(packet.buffer.Len()).To(BeEquivalentTo(maxPacketSize))
|
||||
Expect(packet.frames).To(HaveLen(1))
|
||||
Expect(packet.frames[0].Frame).To(Equal(f))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue