use the new packet header for connections using TLS

This commit is contained in:
Marten Seemann 2017-10-23 12:28:52 +07:00
parent 6c394acde7
commit 4556ad01e5
18 changed files with 631 additions and 421 deletions

View file

@ -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