Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimitListener ¶
LimitListener is the Listener to limit connections.
func NewLimitListener ¶
func NewLimitListener(l net.Listener, n uint32) *LimitListener
NewLimitListener returns a Listener that accepts at most n simultaneous connections from the provided Listener.
func (*LimitListener) Accept ¶
func (l *LimitListener) Accept() (net.Conn, error)
Accept accepts one connection.
func (*LimitListener) SetMaxConnection ¶
func (l *LimitListener) SetMaxConnection(n uint32)
SetMaxConnection sets max connection.
Click to show internal directories.
Click to hide internal directories.