stop using the ExtendedHeader for writing short header packets in tests

This commit is contained in:
Marten Seemann
2022-12-27 10:02:45 +13:00
parent 384ad9b2ae
commit e89fc1152b
9 changed files with 121 additions and 289 deletions

View File

@@ -10,6 +10,9 @@ import (
"github.com/lucas-clemente/quic-go/internal/utils"
)
// ParseShortHeader parses a short header packet.
// It must be called after header protection was removed.
// Otherwise, the check for the reserved bits will (most likely) fail.
func ParseShortHeader(data []byte, connIDLen int) (length int, _ protocol.PacketNumber, _ protocol.PacketNumberLen, _ protocol.KeyPhaseBit, _ error) {
if len(data) == 0 {
return 0, 0, 0, 0, io.EOF