dialer

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DialerHook       DialerHookFunc
	DialHook         DialHookFunc
	ListenConfigHook ListenConfigHookFunc
	ListenPacketHook ListenPacketHookFunc
)
View Source
var (
	ErrAddrNotFound      = errors.New("addr not found")
	ErrNetworkNotSupport = errors.New("network not support")
)

Functions

func Dial

func Dial(network, address string) (net.Conn, error)

func DialContext

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

func Dialer

func Dialer() (*net.Dialer, error)

func ListenConfig

func ListenConfig() (*net.ListenConfig, error)

func ListenPacket

func ListenPacket(network, address string) (net.PacketConn, error)

Types

type DialHookFunc

type DialHookFunc = func(dialer *net.Dialer, network string, ip net.IP) error

func DialerWithInterface

func DialerWithInterface(name string) DialHookFunc

type DialerHookFunc

type DialerHookFunc = func(dialer *net.Dialer) error

type ListenConfigHookFunc

type ListenConfigHookFunc = func(*net.ListenConfig) error

type ListenPacketHookFunc

type ListenPacketHookFunc = func() (net.IP, error)

func ListenPacketWithInterface

func ListenPacketWithInterface(name string) ListenPacketHookFunc

Jump to

Keyboard shortcuts

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