Versions in this module Expand all Collapse all v1 v1.0.0 Nov 12, 2023 Changes in this version + const IPV6_UNICAST_IF — windows/amd64 + const IP_UNICAST_IF — windows/amd64 + var DefaultInterface = atomic.NewTypedValue[string]("") + var DefaultOptions []Option + var DefaultRoutingMark = atomic.NewInt32(0) + var ErrorInvalidedNetworkStack = errors.New("invalided network stack") + var ErrorNoIpAddress = errors.New("no ip address") + func DialContext(ctx context.Context, network, address string, options ...Option) (net.Conn, error) + func GetTcpConcurrent() bool + func ListenPacket(ctx context.Context, network, address string, options ...Option) (net.PacketConn, error) + func LookupLocalAddrFromIfaceName(ifaceName string, network string, destination netip.Addr, port int) (net.Addr, error) + func ParseNetwork(network string, addr netip.Addr) string + func SetTcpConcurrent(concurrent bool) + type Dialer struct + Opt option + func NewDialer(options ...Option) Dialer + func (d Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) + func (d Dialer) ListenPacket(ctx context.Context, network, address string, rAddrPort netip.AddrPort) (net.PacketConn, error) + type NetDialer interface + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + type Option func(opt *option) + func WithAddrReuse(reuse bool) Option + func WithFallbackBind(fallback bool) Option + func WithInterface(name string) Option + func WithMPTCP(mpTcp bool) Option + func WithNetDialer(netDialer NetDialer) Option + func WithOnlySingleStack(isIPv4 bool) Option + func WithOption(o option) Option + func WithPreferIPv4() Option + func WithPreferIPv6() Option + func WithResolver(r resolver.Resolver) Option + func WithRoutingMark(mark int) Option + func WithTFO(tfo bool) Option