add a tracer function to trace sending of Version Negotiation packets

This commit is contained in:
Marten Seemann
2022-08-28 13:54:33 +03:00
parent 21b9ef03be
commit ecc8320c2c
7 changed files with 52 additions and 5 deletions

View File

@@ -50,6 +50,8 @@ func init() {
const eventChanSize = 50
type tracer struct {
logging.NullTracer
getLogWriter func(p logging.Perspective, connectionID []byte) io.WriteCloser
}
@@ -67,10 +69,6 @@ func (t *tracer) TracerForConnection(_ context.Context, p logging.Perspective, o
return nil
}
func (t *tracer) SentPacket(net.Addr, *logging.Header, protocol.ByteCount, []logging.Frame) {}
func (t *tracer) DroppedPacket(net.Addr, logging.PacketType, protocol.ByteCount, logging.PacketDropReason) {
}
type connectionTracer struct {
mutex sync.Mutex