netx

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package netx provides additional libraries that extend some of the behaviors in the net standard package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(net string, addr string) (net.Conn, error)

Dial is like DialTimeout using a default timeout of 1 minute.

func DialTimeout

func DialTimeout(network string, addr string, timeout time.Duration) (net.Conn, error)

DialTimeout dials the given addr on the given net type using the configured dial function, timing out after the given timeout.

func OverrideDial

func OverrideDial(dialFN func(net string, addr string, timeout time.Duration) (net.Conn, error))

OverrideDial overrides the global dial function.

func OverrideResolve

func OverrideResolve(resolveFN func(net string, addr string) (*net.TCPAddr, error))

OverrideResolve overrides the global resolve function.

func Reset

func Reset()

Reset resets netx to its default settings

func Resolve

func Resolve(network string, addr string) (*net.TCPAddr, error)

Resolve resolves the given tcp address using the configured resolve function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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