replace the GetLogWriter quic.Config option by a Tracer interface

This commit is contained in:
Marten Seemann 2020-06-29 13:31:43 +07:00
parent 4121ea84f4
commit ac606222e0
16 changed files with 129 additions and 65 deletions

View file

@ -11,6 +11,11 @@ import (
"github.com/lucas-clemente/quic-go/internal/wire"
)
type Tracer interface {
TracerForServer(odcid protocol.ConnectionID) ConnectionTracer
TracerForClient(odcid protocol.ConnectionID) ConnectionTracer
}
// A ConnectionTracer records events.
type ConnectionTracer interface {
StartedConnection(local, remote net.Addr, version protocol.VersionNumber, srcConnID, destConnID protocol.ConnectionID)