qlog: add support for alpn_information event (#4216)

* qlog chosen alpn

* qlog chosen alpn

* qlog: fix capitalization of ALPN

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
Benedikt Spies
2023-12-26 06:02:47 +01:00
committed by GitHub
parent 2243fdefbf
commit 31a677cacd
8 changed files with 79 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ type ConnectionTracer struct {
LossTimerExpired func(TimerType, EncryptionLevel)
LossTimerCanceled func()
ECNStateUpdated func(state ECNState, trigger ECNStateTrigger)
ChoseALPN func(protocol string)
// Close is called when the connection is closed.
Close func()
Debug func(name, msg string)
@@ -237,6 +238,13 @@ func NewMultiplexedConnectionTracer(tracers ...*ConnectionTracer) *ConnectionTra
}
}
},
ChoseALPN: func(protocol string) {
for _, t := range tracers {
if t.ChoseALPN != nil {
t.ChoseALPN(protocol)
}
}
},
Close: func() {
for _, t := range tracers {
if t.Close != nil {