trace packets that are sent outside of a connection

This commit is contained in:
Marten Seemann
2020-07-16 08:20:36 +07:00
parent f10894a1ce
commit 0c551c893c
9 changed files with 99 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ func (m *tracerMultiplexer) TracerForConnection(p Perspective, odcid ConnectionI
return newConnectionMultiplexer(connTracers...)
}
func (m *tracerMultiplexer) SentPacket(remote net.Addr, hdr *Header, size ByteCount, frames []Frame) {
for _, t := range m.tracers {
t.SentPacket(remote, hdr, size, frames)
}
}
func (m *tracerMultiplexer) DroppedPacket(remote net.Addr, typ PacketType, size ByteCount, reason PacketDropReason) {
for _, t := range m.tracers {
t.DroppedPacket(remote, typ, size, reason)