remove the wire.ShortHeader in favor of more return values (#3535)

This commit is contained in:
Marten Seemann 2022-08-30 14:37:36 +03:00 committed by GitHub
parent 5cd5341545
commit 656f3d2d7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 125 additions and 131 deletions

View file

@ -46,8 +46,6 @@ type (
Header = wire.Header
// The ExtendedHeader is the QUIC Long Header packet header, after removing header protection.
ExtendedHeader = wire.ExtendedHeader
// The ShortHeader is the QUIC Short Header packet header, after removing header protection.
ShortHeader = wire.ShortHeader
// The TransportParameters are QUIC transport parameters.
TransportParameters = wire.TransportParameters
// The PreferredAddress is the preferred address sent in the transport parameters.
@ -94,6 +92,14 @@ const (
StreamTypeBidi = protocol.StreamTypeBidi
)
// The ShortHeader is the QUIC Short Header packet header, after removing header protection.
type ShortHeader struct {
DestConnectionID ConnectionID
PacketNumber PacketNumber
PacketNumberLen protocol.PacketNumberLen
KeyPhase KeyPhaseBit
}
// A Tracer traces events.
type Tracer interface {
// TracerForConnection requests a new tracer for a connection.

View file

@ -207,7 +207,7 @@ func (mr *MockConnectionTracerMockRecorder) ReceivedRetry(arg0 interface{}) *gom
}
// ReceivedShortHeaderPacket mocks base method.
func (m *MockConnectionTracer) ReceivedShortHeaderPacket(arg0 *wire.ShortHeader, arg1 protocol.ByteCount, arg2 []Frame) {
func (m *MockConnectionTracer) ReceivedShortHeaderPacket(arg0 *ShortHeader, arg1 protocol.ByteCount, arg2 []Frame) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedShortHeaderPacket", arg0, arg1, arg2)
}