net

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package net contains utilities for manipulating network.

Index

Constants

View Source
const (
	// LocalAddress is the local address.
	LocalAddress = "127.0.0.1"

	// PublicAddress is the public address.
	PublicAddress = "0.0.0.0"
)

Variables

This section is empty.

Functions

func GetAllIPs added in v0.3.0

func GetAllIPs() ([]string, error)

GetAllIPs returns all IPs of the host.

func GetUnusedPort

func GetUnusedPort(ctx context.Context) (uint32, error)

GetUnusedPort returns an unused port on the local machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳