mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
parse the whole Long Header, if the version is known
This commit is contained in:
parent
b740d57c61
commit
70ce6a5814
11 changed files with 312 additions and 318 deletions
|
@ -23,10 +23,12 @@ var _ = Describe("QUIC Proxy", func() {
|
|||
makePacket := func(p protocol.PacketNumber, payload []byte) []byte {
|
||||
b := &bytes.Buffer{}
|
||||
hdr := wire.ExtendedHeader{
|
||||
PacketNumber: p,
|
||||
PacketNumberLen: protocol.PacketNumberLen4,
|
||||
DestConnectionID: protocol.ConnectionID{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37},
|
||||
SrcConnectionID: protocol.ConnectionID{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37},
|
||||
Header: wire.Header{
|
||||
DestConnectionID: protocol.ConnectionID{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37},
|
||||
SrcConnectionID: protocol.ConnectionID{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37},
|
||||
},
|
||||
PacketNumber: p,
|
||||
PacketNumberLen: protocol.PacketNumberLen4,
|
||||
}
|
||||
Expect(hdr.Write(b, protocol.VersionWhatever)).To(Succeed())
|
||||
raw := b.Bytes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue