net

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseIP

func ParseIP(s string) net.IP

ParseIP parses s as an IP address

func RandomPort

func RandomPort(proto string) (int, error)

RandomPort return a random not used TCP port

func WaitForPort

func WaitForPort(proto string, ip string, port int, timeout time.Duration) error

WaitForPort wait for successful network connection

Types

type InterfaceIPAddress

type InterfaceIPAddress struct {
	Iface string
	IP    string
}

InterfaceIPAddress is used to know the interface and ip address in the sytem

func GetNetworkInterfaces

func GetNetworkInterfaces() []InterfaceIPAddress

GetNetworkInterfaces return the list of network interfaces and IP address

Jump to

Keyboard shortcuts

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