forked from quic-go/quic-go
implement parsing and writing of QUIC v2 packet headers
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// writePacket returns a new raw packet with the specified header and payload
|
||||
func writePacket(hdr *wire.ExtendedHeader, data []byte) []byte {
|
||||
buf := &bytes.Buffer{}
|
||||
hdr.Write(buf, protocol.VersionTLS)
|
||||
hdr.Write(buf, hdr.Version)
|
||||
return append(buf.Bytes(), data...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user