Documentation
¶
Overview ¶
Package limit throttles connections with a token bucket per direction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter is shared by every connection of one user. Upload is what the client sends, download what it receives; each direction gets the full rate.
func (*Limiter) PacketConn ¶
func (l *Limiter) PacketConn(ctx context.Context, conn N.PacketConn) N.PacketConn
PacketConn throttles conn, the client side of a proxied packet connection.
Click to show internal directories.
Click to hide internal directories.