forked from quic-go/quic-go
send packet numbers with 6byte for simpler session tests
This commit is contained in:
@@ -35,7 +35,7 @@ func (h *PublicHeader) WritePublicHeader(b *bytes.Buffer) error {
|
||||
|
||||
b.WriteByte(publicFlagByte)
|
||||
utils.WriteUint64(b, uint64(h.ConnectionID)) // TODO: Send shorter connection id if possible
|
||||
utils.WriteUint32(b, uint32(h.PacketNumber)) // TODO: Send shorter packet number if possible
|
||||
utils.WriteUint48(b, uint64(h.PacketNumber)) // TODO: Send shorter packet number if possible
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ var _ = Describe("Public Header", func() {
|
||||
PacketNumber: 2,
|
||||
}
|
||||
publicHeader.WritePublicHeader(b)
|
||||
Expect(b.Bytes()).To(Equal([]byte{0x2c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0}))
|
||||
Expect(b.Bytes()).To(Equal([]byte{0x2c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0}))
|
||||
})
|
||||
|
||||
It("sets the Version Flag", func() {
|
||||
|
||||
Reference in New Issue
Block a user