mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
remove the LongHeader field from the wire.Header
This commit is contained in:
parent
aca052dc7c
commit
86edf7fd4b
23 changed files with 154 additions and 363 deletions
|
@ -38,7 +38,7 @@ var _ = Describe("0-RTT", func() {
|
|||
if !wire.IsLongHeaderPacket(data[0]) {
|
||||
break
|
||||
}
|
||||
hdr, _, rest, err := wire.ParsePacket(data, 0)
|
||||
hdr, _, rest, err := wire.ParsePacket(data)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
if hdr.Type == protocol.PacketType0RTT {
|
||||
atomic.AddUint32(&num0RTTPackets, 1)
|
||||
|
@ -351,7 +351,7 @@ var _ = Describe("0-RTT", func() {
|
|||
RemoteAddr: fmt.Sprintf("localhost:%d", ln.Addr().(*net.UDPAddr).Port),
|
||||
DelayPacket: func(_ quicproxy.Direction, data []byte) time.Duration {
|
||||
if wire.IsLongHeaderPacket(data[0]) {
|
||||
hdr, _, _, err := wire.ParsePacket(data, 0)
|
||||
hdr, _, _, err := wire.ParsePacket(data)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
if hdr.Type == protocol.PacketType0RTT {
|
||||
atomic.AddUint32(&num0RTTPackets, 1)
|
||||
|
@ -363,7 +363,7 @@ var _ = Describe("0-RTT", func() {
|
|||
if !wire.IsLongHeaderPacket(data[0]) {
|
||||
return false
|
||||
}
|
||||
hdr, _, _, err := wire.ParsePacket(data, 0)
|
||||
hdr, _, _, err := wire.ParsePacket(data)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
if hdr.Type == protocol.PacketType0RTT {
|
||||
// drop 25% of the 0-RTT packets
|
||||
|
@ -398,7 +398,7 @@ var _ = Describe("0-RTT", func() {
|
|||
|
||||
countZeroRTTBytes := func(data []byte) (n protocol.ByteCount) {
|
||||
for len(data) > 0 {
|
||||
hdr, _, rest, err := wire.ParsePacket(data, 0)
|
||||
hdr, _, rest, err := wire.ParsePacket(data)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue