Documentation ¶
Index ¶
- Constants
- func IsIPv4(ip net.IP) bool
- func MaxTime(a, b time.Time) time.Time
- func MinNonZeroDuration(a, b time.Duration) time.Duration
- func MinTime(a, b time.Time) time.Time
- func NewBufferedWriteCloser(writer *bufio.Writer, closer io.Closer) io.WriteCloser
- type ByteOrder
- type LogLevel
- type Logger
- type RTTStats
- func (r *RTTStats) ExpireSmoothedMetrics()
- 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) OnConnectionMigration()
- func (r *RTTStats) PTO(includeMaxAckDelay bool) time.Duration
- 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, now time.Time)
- type Rand
- type Timer
Constants ¶
const InfDuration = time.Duration(math.MaxInt64)
InfDuration is a duration of infinite length
Variables ¶
This section is empty.
Functions ¶
func MinNonZeroDuration ¶ added in v0.32.0
MinNonZeroDuration return the minimum duration that's not zero.
func NewBufferedWriteCloser ¶ added in v0.32.0
NewBufferedWriteCloser creates an io.WriteCloser from a bufio.Writer and an io.Closer
Types ¶
type ByteOrder ¶
type ByteOrder interface { Uint32([]byte) uint32 Uint24([]byte) uint32 Uint16([]byte) uint16 ReadUint32(io.ByteReader) (uint32, error) ReadUint24(io.ByteReader) (uint32, error) ReadUint16(io.ByteReader) (uint16, error) WriteUint32(*bytes.Buffer, uint32) WriteUint24(*bytes.Buffer, uint32) WriteUint16(*bytes.Buffer, uint16) }
A ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.
var BigEndian ByteOrder = bigEndian{}
BigEndian is the big-endian implementation of ByteOrder.
type Logger ¶ added in v0.8.0
type Logger interface { SetLogLevel(LogLevel) SetLogTimeFormat(format string) WithPrefix(prefix string) Logger Debug() bool Errorf(format string, args ...interface{}) Infof(format string, args ...interface{}) Debugf(format string, args ...interface{}) }
A Logger logs.
var DefaultLogger Logger
DefaultLogger is used by quic-go for logging.
type RTTStats ¶ added in v0.32.0
type RTTStats struct {
// contains filtered or unexported fields
}
RTTStats provides round-trip statistics
func NewRTTStats ¶ added in v0.32.0
func NewRTTStats() *RTTStats
NewRTTStats makes a properly initialized RTTStats object
func (*RTTStats) ExpireSmoothedMetrics ¶ added in v0.32.0
func (r *RTTStats) ExpireSmoothedMetrics()
ExpireSmoothedMetrics causes the smoothed_rtt to be increased to the latest_rtt if the latest_rtt is larger. The mean deviation is increased to the most recent deviation if it's larger.
func (*RTTStats) LatestRTT ¶ added in v0.32.0
LatestRTT returns the most recent rtt measurement. May return Zero if no valid updates have occurred.
func (*RTTStats) MaxAckDelay ¶ added in v0.32.0
MaxAckDelay gets the max_ack_delay advertised by the peer
func (*RTTStats) MeanDeviation ¶ added in v0.32.0
MeanDeviation gets the mean deviation
func (*RTTStats) MinRTT ¶ added in v0.32.0
MinRTT Returns the minRTT for the entire connection. May return Zero if no valid updates have occurred.
func (*RTTStats) OnConnectionMigration ¶ added in v0.32.0
func (r *RTTStats) OnConnectionMigration()
OnConnectionMigration is called when connection migrates and rtt measurement needs to be reset.
func (*RTTStats) SetInitialRTT ¶ added in v0.32.0
SetInitialRTT sets the initial RTT. It is used during the 0-RTT handshake when restoring the RTT stats from the session state.
func (*RTTStats) SetMaxAckDelay ¶ added in v0.32.0
SetMaxAckDelay sets the max_ack_delay
func (*RTTStats) SmoothedRTT ¶ added in v0.32.0
SmoothedRTT returns the smoothed RTT for the connection. May return Zero if no valid updates have occurred.
type Rand ¶ added in v0.32.0
type Rand struct {
// contains filtered or unexported fields
}
Rand is a wrapper around crypto/rand that adds some convenience functions known from math/rand.
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
A Timer wrapper that behaves correctly when resetting
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package list implements a doubly linked list.
|
Package list implements a doubly linked list. |