mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
implement the recent changes to the version negotiation packet
This commit is contained in:
parent
5d900346fd
commit
45e43ada40
13 changed files with 87 additions and 100 deletions
|
@ -19,15 +19,14 @@ var _ = Describe("Version Negotiation Packets", func() {
|
|||
Expect(hdr.SupportedVersions).To(Equal(versions))
|
||||
})
|
||||
|
||||
It("writes IETF draft style", func() {
|
||||
It("writes in IETF draft style", func() {
|
||||
versions := []protocol.VersionNumber{1001, 1003}
|
||||
data := ComposeVersionNegotiation(0x1337, 0x42, 0x1234, versions)
|
||||
data := ComposeVersionNegotiation(0x1337, 0x42, versions)
|
||||
hdr, err := parseHeader(bytes.NewReader(data), protocol.PerspectiveServer)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(hdr.Type).To(Equal(protocol.PacketTypeVersionNegotiation))
|
||||
Expect(hdr.IsVersionNegotiation).To(BeTrue())
|
||||
Expect(hdr.ConnectionID).To(Equal(protocol.ConnectionID(0x1337)))
|
||||
Expect(hdr.PacketNumber).To(Equal(protocol.PacketNumber(0x42)))
|
||||
Expect(hdr.Version).To(Equal(protocol.VersionNumber(0x1234)))
|
||||
Expect(hdr.SupportedVersions).To(Equal(versions))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue