Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pacer ¶
type Pacer struct {
// contains filtered or unexported fields
}
Pacer implements a token bucket pacing algorithm.
func NewPacer ¶
func NewPacer(getBandwidth func() congestion.ByteCount) *Pacer
func (*Pacer) SentPacket ¶
func (p *Pacer) SentPacket(sendTime time.Time, size congestion.ByteCount)
func (*Pacer) SetMaxDatagramSize ¶
func (p *Pacer) SetMaxDatagramSize(s congestion.ByteCount)
func (*Pacer) TimeUntilSend ¶
TimeUntilSend returns when the next packet should be sent. It returns the zero value of time.Time if a packet can be sent immediately.
Click to show internal directories.
Click to hide internal directories.