forked from quic-go/quic-go
drop support for QUIC 37 and 38
This commit is contained in:
@@ -26,11 +26,8 @@ type ByteOrder interface {
|
||||
WriteUfloat16(*bytes.Buffer, uint64)
|
||||
}
|
||||
|
||||
// GetByteOrder gets the ByteOrder (little endian or big endian) used to represent values on the wire
|
||||
// GetByteOrder gets the ByteOrder 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.Version37 || v == protocol.Version38 {
|
||||
return LittleEndian
|
||||
}
|
||||
return BigEndian
|
||||
}
|
||||
|
||||
@@ -7,12 +7,8 @@ import (
|
||||
)
|
||||
|
||||
var _ = Describe("Byte Order", func() {
|
||||
It("says little Little Endian before QUIC 39", func() {
|
||||
Expect(GetByteOrder(protocol.Version37)).To(Equal(LittleEndian))
|
||||
Expect(GetByteOrder(protocol.Version38)).To(Equal(LittleEndian))
|
||||
})
|
||||
|
||||
It("says little Little Endian for QUIC 39", func() {
|
||||
It("says little Little Endian for QUIC 39 and TLS", func() {
|
||||
Expect(GetByteOrder(protocol.Version39)).To(Equal(BigEndian))
|
||||
Expect(GetByteOrder(protocol.VersionTLS)).To(Equal(BigEndian))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user