Documentation
¶
Index ¶
- Constants
- Variables
- func Max[T constraints.Ordered](x, y T) T
- func Min[T constraints.Ordered](x, y T) T
- func NewBufferedWriteCloser(writer *bufio.Writer, closer io.Closer) io.WriteCloser
- type ByteInterval
- type ConnectionStats
- type LogLevel
- type Logger
- type RTTStats
- func (r *RTTStats) Clone() *RTTStats
- func (r *RTTStats) HasMeasurement() bool
- func (r *RTTStats) LatestRTT() time.Duration
- func (r *RTTStats) MaxAckDelay() time.Duration
- func (r *RTTStats) MeanDeviation() time.Duration
- func (r *RTTStats) MinRTT() time.Duration
- func (r *RTTStats) PTO(includeMaxAckDelay bool) time.Duration
- func (r *RTTStats) ResetForPathMigration()
- func (r *RTTStats) SetInitialRTT(t time.Duration)
- func (r *RTTStats) SetMaxAckDelay(mad time.Duration)
- func (r *RTTStats) SmoothedRTT() time.Duration
- func (r *RTTStats) UpdateRTT(sendDelta, ackDelay time.Duration)
- type Rand
Constants ¶
const DefaultInitialRTT = 100 * time.Millisecond
The default RTT used before an RTT sample is taken
Variables ¶
var AfterFunc = context.AfterFunc
var WithoutCancel = context.WithoutCancel
Functions ¶
func Max ¶
func Max[T constraints.Ordered](x, y T) T
func Min ¶
func Min[T constraints.Ordered](x, y T) T
func NewBufferedWriteCloser ¶
NewBufferedWriteCloser creates an io.WriteCloser from a bufio.Writer and an io.Closer
Types ¶
type ByteInterval ¶
ByteInterval is an interval from one ByteCount to the other
func (ByteInterval) Comp ¶
func (i ByteInterval) Comp(v ByteInterval) int8
func (ByteInterval) Match ¶
func (i ByteInterval) Match(n ByteInterval) int8
func (ByteInterval) String ¶
func (i ByteInterval) String() string
type ConnectionStats ¶
type ConnectionStats struct {
BytesSent atomic.Uint64
PacketsSent atomic.Uint64
BytesReceived atomic.Uint64
PacketsReceived atomic.Uint64
BytesLost atomic.Uint64
PacketsLost atomic.Uint64
}
ConnectionStats stores stats for the connection. See the public ConnectionStats struct in connection.go for more information
type Logger ¶
type Logger interface {
SetLogLevel(LogLevel)
SetLogTimeFormat(format string)
WithPrefix(prefix string) Logger
Debug() bool
Errorf(format string, args ...any)
Infof(format string, args ...any)
Debugf(format string, args ...any)
}
A Logger logs.
var DefaultLogger Logger
DefaultLogger is used by quic-go for logging.
type RTTStats ¶
type RTTStats struct {
// contains filtered or unexported fields
}
RTTStats provides round-trip statistics
func NewRTTStats ¶
func NewRTTStats() *RTTStats
func (*RTTStats) HasMeasurement ¶
func (*RTTStats) LatestRTT ¶
LatestRTT returns the most recent rtt measurement. May return Zero if no valid updates have occurred.
func (*RTTStats) MaxAckDelay ¶
MaxAckDelay gets the max_ack_delay advertised by the peer
func (*RTTStats) MeanDeviation ¶
MeanDeviation gets the mean deviation
func (*RTTStats) MinRTT ¶
MinRTT Returns the minRTT for the entire connection. May return Zero if no valid updates have occurred.
func (*RTTStats) ResetForPathMigration ¶
func (r *RTTStats) ResetForPathMigration()
func (*RTTStats) SetInitialRTT ¶
SetInitialRTT sets the initial RTT. It is used during handshake when restoring the RTT stats from the token.
func (*RTTStats) SetMaxAckDelay ¶
SetMaxAckDelay sets the max_ack_delay
func (*RTTStats) SmoothedRTT ¶
SmoothedRTT returns the smoothed RTT for the connection. May return Zero if no valid updates have occurred.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package list implements a doubly linked list.
|
Package list implements a doubly linked list. |