Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LimitListener ¶
func LimitListener(addr string, opts ...ListenerOption) (net.Listener, error)
LimitListener creates a tcp keep-alive listener with 400 maximum connections.
Types ¶
type ListenerOption ¶
type ListenerOption func(*listenerConfig)
ListenerOption is a listener option
func SetConnectionCount ¶
func SetConnectionCount(c int) ListenerOption
SetConnectionCount sets connection count
Click to show internal directories.
Click to hide internal directories.