Documentation ¶
Overview ¶
Package netx provides additional libraries that extend some of the behaviors in the net standard package.
Index ¶
- func Dial(net string, addr string) (net.Conn, error)
- func DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
- func DialTimeout(network string, addr string, timeout time.Duration) (net.Conn, error)
- func DialUDP(network string, laddr, raddr *net.UDPAddr) (net.PacketConn, error)
- func ListenUDP(network string, laddr *net.UDPAddr) (net.PacketConn, error)
- func OverrideDial(dialFN func(ctx context.Context, net string, addr string) (net.Conn, error))
- func OverrideDialUDP(dial func(nnetwork string, laddr, raddr *net.UDPAddr) (net.PacketConn, error))
- func OverrideListenUDP(listen func(network string, laddr *net.UDPAddr) (net.PacketConn, error))
- func OverrideResolve(resolveFN func(net string, addr string) (*net.TCPAddr, error))
- func Reset()
- func Resolve(network string, addr string) (*net.TCPAddr, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
DialContext dials the given addr on the given net type using the configured dial function, with the given context.
func DialTimeout ¶
DialTimeout dials the given addr on the given net type using the configured dial function, timing out after the given timeout.
func OverrideDial ¶
OverrideDial overrides the global dial function.
func OverrideDialUDP ¶
func OverrideListenUDP ¶
func OverrideResolve ¶
OverrideResolve overrides the global resolve function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.