mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
use the new packet header for connections using TLS
This commit is contained in:
parent
6c394acde7
commit
4556ad01e5
18 changed files with 631 additions and 421 deletions
|
@ -20,13 +20,13 @@ type packetData []byte
|
|||
var _ = Describe("QUIC Proxy", func() {
|
||||
makePacket := func(p protocol.PacketNumber, payload []byte) []byte {
|
||||
b := &bytes.Buffer{}
|
||||
hdr := wire.PublicHeader{
|
||||
hdr := wire.Header{
|
||||
PacketNumber: p,
|
||||
PacketNumberLen: protocol.PacketNumberLen6,
|
||||
ConnectionID: 1337,
|
||||
OmitConnectionID: false,
|
||||
}
|
||||
hdr.Write(b, protocol.VersionWhatever, protocol.PerspectiveServer)
|
||||
hdr.Write(b, protocol.PerspectiveServer, protocol.VersionWhatever)
|
||||
raw := b.Bytes()
|
||||
raw = append(raw, payload...)
|
||||
return raw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue