only use little endian byte order for gQUIC 37 and 38

That way, when adding new non-gQUIC versions, they will use big endian.
This commit is contained in:
Marten Seemann
2017-10-30 12:43:05 +07:00
parent 085702df36
commit aba1dd13ba
4 changed files with 51 additions and 51 deletions

View File

@@ -29,7 +29,7 @@ type ByteOrder interface {
// GetByteOrder gets the ByteOrder (little endian or big endian) used to represent values on the wire
// from QUIC 39, values are encoded in big endian, before that in little endian
func GetByteOrder(v protocol.VersionNumber) ByteOrder {
if v < protocol.Version39 {
if v == protocol.Version37 || v == protocol.Version38 {
return LittleEndian
}
return BigEndian