Documentation ¶
Index ¶
- Variables
- func DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func DialContextReusePortFunc(registry *registry.Registry) func(ctx context.Context, network, addr string) (net.Conn, error)
- func ReusePortControl(_, _ string, c syscall.RawConn) error
- func SetTCPOptions(conn net.Conn) error
- func SetTrafficClass(conn net.Conn, class int) error
Constants ¶
This section is empty.
Variables ¶
var SupportsReusePort = false
Functions ¶
func DialContext ¶ added in v1.3.3
DialContext dials via context and/or directly, depending on how it is configured. If dialing via proxy and allowing fallback, dialing for both happens simultaneously and the proxy connection is returned if successful.
func DialContextReusePortFunc ¶ added in v1.20.0
func DialContextReusePortFunc(registry *registry.Registry) func(ctx context.Context, network, addr string) (net.Conn, error)
DialContextReusePort tries dialing via proxy if a proxy is configured, and falls back to a direct connection reusing the port from the connections registry, if no proxy is defined, or connecting via proxy fails. It also in parallel dials without reusing the port, just in case reusing the port affects routing decisions badly.
func SetTCPOptions ¶ added in v0.12.17
SetTCPOptions sets our default TCP options on a TCP connection, possibly digging through dialerConn to extract the *net.TCPConn
Types ¶
This section is empty.