wire: use constants for frame types (#3739)

This commit is contained in:
Marten Seemann
2023-04-19 14:58:31 +02:00
committed by GitHub
parent 48e18b922d
commit 7a393315bd
35 changed files with 118 additions and 100 deletions

View File

@@ -54,7 +54,7 @@ func parseNewConnectionIDFrame(r *bytes.Reader, _ protocol.VersionNumber) (*NewC
}
func (f *NewConnectionIDFrame) Append(b []byte, _ protocol.VersionNumber) ([]byte, error) {
b = append(b, 0x18)
b = append(b, newConnectionIDFrameType)
b = quicvarint.Append(b, f.SequenceNumber)
b = quicvarint.Append(b, f.RetirePriorTo)
connIDLen := f.ConnectionID.Len()