mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
implement version-dependent parsing of the Public Header
This commit is contained in:
parent
1a8a012019
commit
dd0daaaf1e
17 changed files with 311 additions and 124 deletions
|
@ -238,7 +238,7 @@ var _ = Describe("Packet packer", func() {
|
|||
p, err := packer.PackPacket()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(p).ToNot(BeNil())
|
||||
hdr, err := ParsePublicHeader(bytes.NewReader(p.raw), protocol.PerspectiveClient)
|
||||
hdr, err := ParsePublicHeader(bytes.NewReader(p.raw), protocol.PerspectiveClient, packer.version)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(hdr.VersionFlag).To(BeTrue())
|
||||
Expect(hdr.VersionNumber).To(Equal(packer.version))
|
||||
|
@ -252,7 +252,7 @@ var _ = Describe("Packet packer", func() {
|
|||
p, err := packer.PackPacket()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(p).ToNot(BeNil())
|
||||
hdr, err := ParsePublicHeader(bytes.NewReader(p.raw), protocol.PerspectiveClient)
|
||||
hdr, err := ParsePublicHeader(bytes.NewReader(p.raw), protocol.PerspectiveClient, packer.version)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(hdr.VersionFlag).To(BeFalse())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue