addr

package
v0.0.98 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseUrl

func BaseUrl(rawurl string) (addr string, err error)

http://:80

func DialIP added in v0.0.11

func DialIP(network, address string, timeout time.Duration) (net.IP, error)

DialIP returns the local IP to in Dial.

func ListenIP added in v0.0.10

func ListenIP() (net.IP, error)

ListenIP returns the IP to bind to in Listen. It tries to find an IP that can be used by other machines to reach this machine.

func LocalIPAddrByTcp

func LocalIPAddrByTcp(addr string) (string, error)

func LocalIPAddrByUDPMulticast

func LocalIPAddrByUDPMulticast() (string, error)

func ServeIP added in v0.0.11

func ServeIP(networks, addresses []string, timeout time.Duration) (net.IP, error)

ServeIP returns the IP to bind to in Listen. It tries to find an IP that can be used by other machines to reach this machine. Order is by DialIP and ListenIP

Types

This section is empty.

Jump to

Keyboard shortcuts

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