freeport

package
v0.0.0-...-45da7de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFree

func IsFree(port int) bool

IsFree tells whether the port is free or not

func Listen

func Listen(port int) (net.Listener, error)

Listen listens on port.

func Port

func Port() int

Port Ask the kernel for a free open port that is ready to use. this will panic if any error is encountered.

func PortE

func PortE() (int, error)

PortE asks the kernel for a free open port that is ready to use.

func PortStart

func PortStart(starting int) int

PortStart finds a free port from starting port

func Ports

func Ports(count int) ([]int, error)

Ports asks the kernel for free open ports that are ready to use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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