mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 04:07:35 +03:00
Merge pull request #3153 from lucas-clemente/trace-version-selection
trace and qlog version selection / negotiation
This commit is contained in:
commit
0413afd615
12 changed files with 170 additions and 4 deletions
|
@ -105,6 +105,7 @@ type Tracer interface {
|
|||
// A ConnectionTracer records events.
|
||||
type ConnectionTracer interface {
|
||||
StartedConnection(local, remote net.Addr, srcConnID, destConnID ConnectionID)
|
||||
NegotiatedVersion(chosen VersionNumber, clientVersions, serverVersions []VersionNumber)
|
||||
ClosedConnection(CloseReason)
|
||||
SentTransportParameters(*TransportParameters)
|
||||
ReceivedTransportParameters(*TransportParameters)
|
||||
|
|
|
@ -170,6 +170,18 @@ func (mr *MockConnectionTracerMockRecorder) LostPacket(arg0, arg1, arg2 interfac
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LostPacket", reflect.TypeOf((*MockConnectionTracer)(nil).LostPacket), arg0, arg1, arg2)
|
||||
}
|
||||
|
||||
// NegotiatedVersion mocks base method.
|
||||
func (m *MockConnectionTracer) NegotiatedVersion(arg0 protocol.VersionNumber, arg1, arg2 []protocol.VersionNumber) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "NegotiatedVersion", arg0, arg1, arg2)
|
||||
}
|
||||
|
||||
// NegotiatedVersion indicates an expected call of NegotiatedVersion.
|
||||
func (mr *MockConnectionTracerMockRecorder) NegotiatedVersion(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NegotiatedVersion", reflect.TypeOf((*MockConnectionTracer)(nil).NegotiatedVersion), arg0, arg1, arg2)
|
||||
}
|
||||
|
||||
// ReceivedPacket mocks base method.
|
||||
func (m *MockConnectionTracer) ReceivedPacket(arg0 *wire.ExtendedHeader, arg1 protocol.ByteCount, arg2 []Frame) {
|
||||
m.ctrl.T.Helper()
|
||||
|
|
|
@ -68,6 +68,12 @@ func (m *connTracerMultiplexer) StartedConnection(local, remote net.Addr, srcCon
|
|||
}
|
||||
}
|
||||
|
||||
func (m *connTracerMultiplexer) NegotiatedVersion(chosen VersionNumber, clientVersions, serverVersions []VersionNumber) {
|
||||
for _, t := range m.tracers {
|
||||
t.NegotiatedVersion(chosen, clientVersions, serverVersions)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *connTracerMultiplexer) ClosedConnection(reason CloseReason) {
|
||||
for _, t := range m.tracers {
|
||||
t.ClosedConnection(reason)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue