net

package
v0.0.0-...-02ae7d7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllIPs

func GetAllIPs(predicates ...AddressPredicate) ([]string, error)

GetAllIPs returns all IPs (IPv4 and IPv6) from the all network interfaces on the machine

func IsAddressIPv6

func IsAddressIPv6(address string) bool

func NonLoopback

func NonLoopback(address *net.IPNet) bool

func PickTCPPort

func PickTCPPort(ip string, leftPort, rightPort uint32) (uint32, error)

func ReserveTCPAddr

func ReserveTCPAddr(address string) (uint32, error)

func ToV6

func ToV6(ip string) string

ToV6 return self if ip6 other return the v4 prefixed with ::ffff:

Types

type AddressPredicate

type AddressPredicate = func(address *net.IPNet) bool

Jump to

Keyboard shortcuts

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