dialer

package
v1.9.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: MPL-2.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportsReusePort = false

Functions

func DialContext added in v1.3.3

func DialContext(ctx context.Context, network, addr string) (net.Conn, error)

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 DialContextReusePort added in v1.8.0

func DialContextReusePort(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 ReusePortControl added in v1.8.0

func ReusePortControl(_, _ string, c syscall.RawConn) error

func SetTCPOptions added in v0.12.17

func SetTCPOptions(conn net.Conn) error

SetTCPOptions sets our default TCP options on a TCP connection, possibly digging through dialerConn to extract the *net.TCPConn

func SetTrafficClass added in v0.14.17

func SetTrafficClass(conn net.Conn, class int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL