Documentation
¶
Overview ¶
Package ircconn provides transport connections that frame IRC messages, along with outbound rate limiting.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxLine is the default maximum length of an IRC message line in bytes. DefaultMaxLine = 512 // MaxTagBytes is the maximum length of the IRC message tags section in bytes. MaxTagBytes = 8191 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface {
ReadMessage(ctx context.Context) (ircmsg.Message, error)
WriteMessage(ctx context.Context, m ircmsg.Message) error
Close() error
RemoteAddr() net.Addr
}
Conn represents a transport that frames IRC messages on the wire.
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter gates outbound sends through a token bucket.
type RateLimit ¶
RateLimit configures outbound flood protection.
func (RateLimit) NewLimiter ¶
NewLimiter returns a Limiter built from the RateLimit configuration.
Click to show internal directories.
Click to hide internal directories.