rename the logging.CloseReason to TimeoutReason

This commit is contained in:
Marten Seemann 2020-07-10 12:37:36 +07:00
parent 53856bda60
commit 7d6ce4ea45
10 changed files with 31 additions and 24 deletions

View file

@ -8,6 +8,7 @@ import (
"github.com/lucas-clemente/quic-go/internal/congestion"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/qerr"
"github.com/lucas-clemente/quic-go/internal/wire"
)
@ -32,6 +33,7 @@ type (
StreamType = protocol.StreamType
// The VersionNumber is the QUIC version.
VersionNumber = protocol.VersionNumber
// The Header is the QUIC packet header, before removing header protection.
Header = wire.Header
// The ExtendedHeader is the QUIC packet header, after removing header protection.
@ -39,6 +41,11 @@ type (
// The TransportParameters are QUIC transport parameters.
TransportParameters = wire.TransportParameters
// A TransportError is a transport-level error code.
TransportError = qerr.ErrorCode
// An ApplicationError is an application-defined error code.
ApplicationError = qerr.ErrorCode
// The RTTStats contain statistics used by the congestion controller.
RTTStats = congestion.RTTStats
)
@ -77,7 +84,7 @@ type Tracer interface {
// A ConnectionTracer records events.
type ConnectionTracer interface {
StartedConnection(local, remote net.Addr, version VersionNumber, srcConnID, destConnID ConnectionID)
ClosedConnection(CloseReason)
ClosedConnection(TimeoutReason)
SentTransportParameters(*TransportParameters)
ReceivedTransportParameters(*TransportParameters)
SentPacket(hdr *ExtendedHeader, packetSize ByteCount, ack *AckFrame, frames []Frame)