Documentation
¶
Overview ¶
Package handshake bounds concurrent server-side TLS and DTLS handshakes.
Index ¶
Constants ¶
const ( // DefaultLimit is the default maximum number of pending handshakes. DefaultLimit = 1024 // DefaultTimeout is the default server-side handshake timeout. DefaultTimeout = 30 * time.Second )
Variables ¶
var ErrTooManyPending = errors.New("too many pending handshakes")
ErrTooManyPending indicates that a handshake was evicted to admit another.
Functions ¶
This section is empty.
Types ¶
type Attempt ¶
type Attempt struct {
// contains filtered or unexported fields
}
Attempt represents one admitted handshake and must be run exactly once.
type Pending ¶
type Pending struct {
// contains filtered or unexported fields
}
Pending tracks handshakes in admission order.
func NewPending ¶
NewPending creates a tracker; a zero limit allows unlimited handshakes.