xnet

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTCPPort

func GetTCPPort(address string) (int, error)

GetTCPPort gets a free TCP port for given address. When address is not provided (is empty), 127.0.0.1 is used.

func IsEmailAddress

func IsEmailAddress(addr string) bool

IsEmailAddress returns whether addr is a valid email address. What is not supported as valid:

* quoted local-parts

* following allowed characters are not supported: ! $ % & ' * / = ? ^ ` { | }

func MustGetLocalhostTCPPort

func MustGetLocalhostTCPPort() int

MustGetLocalhostTCPPort gets a free TCP port for IP 127.0.0.1. Panics when an error occurs.

func OutboundIP

func OutboundIP() (net.IP, error)

OutboundIP retrieves the IP address with which the system is communicating with the internet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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