mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 05:07:36 +03:00
parent
44e19787f3
commit
7bf94df817
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ type PublicHeader struct {
|
|||
|
||||
// WritePublicHeader writes a public header
|
||||
func (h *PublicHeader) WritePublicHeader(b *bytes.Buffer) error {
|
||||
publicFlagByte := uint8(0x30)
|
||||
publicFlagByte := uint8(0x34)
|
||||
if h.VersionFlag && h.ResetFlag {
|
||||
return errResetAndVersionFlagSet
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ var _ = Describe("Public Header", func() {
|
|||
PacketNumber: 2,
|
||||
}
|
||||
publicHeader.WritePublicHeader(b)
|
||||
Expect(b.Bytes()).To(Equal([]byte{0x38, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0}))
|
||||
Expect(b.Bytes()).To(Equal([]byte{0x3c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0}))
|
||||
})
|
||||
|
||||
It("sets the Version Flag", func() {
|
||||
|
|
|
@ -47,7 +47,7 @@ var _ = Describe("Server", func() {
|
|||
|
||||
It("composes version negotiation packets", func() {
|
||||
expected := append(
|
||||
[]byte{0x39, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0},
|
||||
[]byte{0x3d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0},
|
||||
protocol.SupportedVersionsAsTags...,
|
||||
)
|
||||
Expect(composeVersionNegotiation(1)).To(Equal(expected))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue