package
1.0.1
Repository: https://github.com/lessos/lessgo.git
Documentation: pkg.go.dev

# README

net/portutil

network port utils

Example

package main

import (
	"fmt"

	"github.com/lessos/lessgo/net/portutil"
)

func main() {

	if port, err := portutil.Free(5000, 1000); err == nil {
		fmt.Println("free port ", port)
	}

	if start, end, err := portutil.FreeRange(5500, 50000); err == nil {
		fmt.Printf("free ports %d~%d\n", start, end)
	}

	fmt.Println("check   80", portutil.IsFree(80))
}

# Functions

No description provided by the author
No description provided by the author
No description provided by the author