Documentation
¶
Overview ¶
Package net implements functions for running network servers.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartAcceptLoop ¶
StartAcceptLoop starts an accept loop for the given listener, returning accepted connections via a channel while handling temporary network errors. Fatal errors are returned via the error channel with the listener closed on return.
func StartForeverAcceptLoop ¶
StartForeverAcceptLoop starts an accept loop for the given listener that retries forever, returning accepted connections via a channel while handling temporary network errors. Fatal errors are returned via the error channel with the listener closed on return.
Types ¶
type ListenerOption ¶ added in v0.15.0
type ListenerOption func(o *ListenerOptions)
ListenerOption is a listener option that can be applied to a set of listener options.
func ListenerReusePort ¶ added in v0.15.0
func ListenerReusePort(value bool) ListenerOption
ListenerReusePort is a listener option to reuse ports.
type ListenerOptions ¶ added in v0.15.0
type ListenerOptions struct {
// contains filtered or unexported fields
}
ListenerOptions is a set of listener options that can create listeners.
func NewListenerOptions ¶ added in v0.15.0
func NewListenerOptions(opts ...ListenerOption) ListenerOptions
NewListenerOptions creates a set of listener options with supplied options.