dialer

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultOptions     []Option
	DefaultInterface   = atomic.NewString("")
	DefaultRoutingMark = atomic.NewInt32(0)
)

Functions

func DialContext

func DialContext(ctx context.Context, network, address string, options ...Option) (net.Conn, error)

func ListenPacket

func ListenPacket(ctx context.Context, network, address string, options ...Option) (net.PacketConn, error)

func WithBindToInterfaceControlFn

func WithBindToInterfaceControlFn(interfaceName string) func(network, address string, c syscall.RawConn) (err error)

Types

type Option

type Option func(opt *option)

func WithAddrReuse

func WithAddrReuse(reuse bool) Option

func WithDirect

func WithDirect() Option

func WithFallbackBind

func WithFallbackBind(fallback bool) Option

func WithInterface

func WithInterface(name string) Option

func WithRoutingMark

func WithRoutingMark(mark int) Option

Jump to

Keyboard shortcuts

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