Documentation
¶
Overview ¶
Package netmux provides a simple way to multiplex (mux) network connections based on content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error string
Error is a network connection mux error.
const ( // ErrListenerClosed is the listener closed error. ErrListenerClosed Error = "listener closed" )
Error values.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener
type Netmux ¶
type Netmux struct { // Default is the default listener. Default *Listener // contains filtered or unexported fields }
Netmux is a network connection multiplexor.
func Listen ¶
Listen is a utility func wrapping a call to net.Listen and passing the returned net.Listener and provided options to New.
func ListenTLS ¶
ListenTLS is a utility func wrapping a call to tls.Listen and passing the returned net.Listener and provided options to New.
type Option ¶
Option is a network connection multiplexor option.
func Proxy ¶
Proxy is a netmux option that sets the upstream networks or IP addresses allowed to send the PROXY protocol header.
The provided network addresses can be any IP or CIDR accepted by net.ParseIP or net.ParseCIDR.
When set on a Netmux, any Listener.RemoteAddr() call will return the address sent via the PROXY header.
See: http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt