package utils

Import Path
	github.com/quic-go/quic-go/internal/utils (on go.dev)

Dependency Relation
	imports 11 packages, and imported by 7 packages


Package-Level Type Names (total 5)
/* sort by: | */
ConnectionStats stores stats for the connection. See the public ConnectionStats struct in connection.go for more information BytesLost atomic.Uint64 BytesReceived atomic.Uint64 BytesSent atomic.Uint64 PacketsLost atomic.Uint64 PacketsReceived atomic.Uint64 PacketsSent atomic.Uint64 func github.com/quic-go/quic-go/internal/ackhandler.NewSentPacketHandler(initialPN protocol.PacketNumber, initialMaxDatagramSize protocol.ByteCount, rttStats *RTTStats, connStats *ConnectionStats, clientAddressValidated bool, enableECN bool, ignorePacketsBelow func(protocol.PacketNumber), pers protocol.Perspective, qlogger qlogwriter.Recorder, logger Logger) ackhandler.SentPacketHandler func github.com/quic-go/quic-go/internal/congestion.NewCubicSender(clock congestion.Clock, rttStats *RTTStats, connStats *ConnectionStats, initialMaxDatagramSize protocol.ByteCount, reno bool, qlogger qlogwriter.Recorder) *congestion.cubicSender
A Logger logs. ( Logger) Debug() bool ( Logger) Debugf(format string, args ...any) ( Logger) Errorf(format string, args ...any) ( Logger) Infof(format string, args ...any) ( Logger) SetLogLevel(LogLevel) ( Logger) SetLogTimeFormat(format string) ( Logger) WithPrefix(prefix string) Logger Logger : github.com/stretchr/testify/assert.TestingT func Logger.WithPrefix(prefix string) Logger func github.com/quic-go/quic-go/internal/ackhandler.NewReceivedPacketHandler(logger Logger) *ackhandler.ReceivedPacketHandler func github.com/quic-go/quic-go/internal/ackhandler.NewSentPacketHandler(initialPN protocol.PacketNumber, initialMaxDatagramSize protocol.ByteCount, rttStats *RTTStats, connStats *ConnectionStats, clientAddressValidated bool, enableECN bool, ignorePacketsBelow func(protocol.PacketNumber), pers protocol.Perspective, qlogger qlogwriter.Recorder, logger Logger) ackhandler.SentPacketHandler func github.com/quic-go/quic-go/internal/flowcontrol.NewConnectionFlowController(receiveWindow protocol.ByteCount, maxReceiveWindow protocol.ByteCount, allowWindowIncrease func(size protocol.ByteCount) bool, rttStats *RTTStats, logger Logger) *flowcontrol.connectionFlowController func github.com/quic-go/quic-go/internal/flowcontrol.NewStreamFlowController(streamID protocol.StreamID, cfc flowcontrol.ConnectionFlowController, receiveWindow protocol.ByteCount, maxReceiveWindow protocol.ByteCount, initialSendWindow protocol.ByteCount, rttStats *RTTStats, logger Logger) flowcontrol.StreamFlowController func github.com/quic-go/quic-go/internal/handshake.NewCryptoSetupClient(connID protocol.ConnectionID, tp *wire.TransportParameters, tlsConf *tls.Config, enable0RTT bool, rttStats *RTTStats, qlogger qlogwriter.Recorder, logger Logger, version protocol.Version) handshake.CryptoSetup func github.com/quic-go/quic-go/internal/handshake.NewCryptoSetupServer(connID protocol.ConnectionID, localAddr, remoteAddr net.Addr, tp *wire.TransportParameters, tlsConf *tls.Config, allow0RTT bool, rttStats *RTTStats, qlogger qlogwriter.Recorder, logger Logger, version protocol.Version) handshake.CryptoSetup func github.com/quic-go/quic-go/internal/wire.LogFrame(logger Logger, frame wire.Frame, sent bool) func github.com/quic-go/quic-go/internal/wire.LogShortHeader(logger Logger, dest protocol.ConnectionID, pn protocol.PacketNumber, pnLen protocol.PacketNumberLen, kp protocol.KeyPhaseBit) func github.com/quic-go/quic-go/internal/wire.(*ExtendedHeader).Log(logger Logger) var DefaultLogger
LogLevel of quic-go func Logger.SetLogLevel(LogLevel) const LogLevelDebug const LogLevelError const LogLevelInfo const LogLevelNothing
Rand is a wrapper around crypto/rand that adds some convenience functions known from math/rand. (*Rand) Int31() int32 copied from the standard library math/rand implementation of Int63n
RTTStats provides round-trip statistics (*RTTStats) Clone() *RTTStats (*RTTStats) HasMeasurement() bool LatestRTT returns the most recent rtt measurement. May return Zero if no valid updates have occurred. MaxAckDelay gets the max_ack_delay advertised by the peer MeanDeviation gets the mean deviation MinRTT Returns the minRTT for the entire connection. May return Zero if no valid updates have occurred. PTO gets the probe timeout duration. (*RTTStats) ResetForPathMigration() SetInitialRTT sets the initial RTT. It is used during handshake when restoring the RTT stats from the token. SetMaxAckDelay sets the max_ack_delay SmoothedRTT returns the smoothed RTT for the connection. May return Zero if no valid updates have occurred. UpdateRTT updates the RTT based on a new sample. func NewRTTStats() *RTTStats func (*RTTStats).Clone() *RTTStats func github.com/quic-go/quic-go/internal/ackhandler.NewSentPacketHandler(initialPN protocol.PacketNumber, initialMaxDatagramSize protocol.ByteCount, rttStats *RTTStats, connStats *ConnectionStats, clientAddressValidated bool, enableECN bool, ignorePacketsBelow func(protocol.PacketNumber), pers protocol.Perspective, qlogger qlogwriter.Recorder, logger Logger) ackhandler.SentPacketHandler func github.com/quic-go/quic-go/internal/congestion.NewCubicSender(clock congestion.Clock, rttStats *RTTStats, connStats *ConnectionStats, initialMaxDatagramSize protocol.ByteCount, reno bool, qlogger qlogwriter.Recorder) *congestion.cubicSender func github.com/quic-go/quic-go/internal/flowcontrol.NewConnectionFlowController(receiveWindow protocol.ByteCount, maxReceiveWindow protocol.ByteCount, allowWindowIncrease func(size protocol.ByteCount) bool, rttStats *RTTStats, logger Logger) *flowcontrol.connectionFlowController func github.com/quic-go/quic-go/internal/flowcontrol.NewStreamFlowController(streamID protocol.StreamID, cfc flowcontrol.ConnectionFlowController, receiveWindow protocol.ByteCount, maxReceiveWindow protocol.ByteCount, initialSendWindow protocol.ByteCount, rttStats *RTTStats, logger Logger) flowcontrol.StreamFlowController func github.com/quic-go/quic-go/internal/handshake.NewCryptoSetupClient(connID protocol.ConnectionID, tp *wire.TransportParameters, tlsConf *tls.Config, enable0RTT bool, rttStats *RTTStats, qlogger qlogwriter.Recorder, logger Logger, version protocol.Version) handshake.CryptoSetup func github.com/quic-go/quic-go/internal/handshake.NewCryptoSetupServer(connID protocol.ConnectionID, localAddr, remoteAddr net.Addr, tp *wire.TransportParameters, tlsConf *tls.Config, allow0RTT bool, rttStats *RTTStats, qlogger qlogwriter.Recorder, logger Logger, version protocol.Version) handshake.CryptoSetup
Package-Level Functions (total 2)
NewBufferedWriteCloser creates an io.WriteCloser from a bufio.Writer and an io.Closer
Package-Level Variables (only one)
DefaultLogger is used by quic-go for logging.
Package-Level Constants (total 5)
The default RTT used before an RTT sample is taken
LogLevelDebug enables debug logs (e.g. packet contents)
LogLevelError enables err logs
LogLevelInfo enables info logs (e.g. packets)
LogLevelNothing disables