znet

package
v0.12.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNPortsListen added in v0.10.8

func FindNPortsListen(n int) (ports []int, err error)

* Find N unique open ports by calling net.Listen with ":0" to let the OS assign a port

func FindPortDial added in v0.10.8

func FindPortDial(host string, min, max int, timeout time.Duration) (port int, err error)

* Iterate over port range to find an open port using net.Dial. If timeout == 0, the default timeout will be used

func FindPortListen added in v0.10.19

func FindPortListen() (port int, err error)

*

  • Find an open port by calling net.Listen with ":0" to let the OS assign a port

func GetOutboundIP added in v0.12.0

func GetOutboundIP() (net.IP, error)

Get preferred outbound ip of this machine

Types

This section is empty.

Jump to

Keyboard shortcuts

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