netbind

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectIPFamilies

func DetectIPFamilies() (bool, bool)

func IsLoopbackHost

func IsLoopbackHost(host string) bool

func IsUnspecifiedHost

func IsUnspecifiedHost(host string) bool

func NormalizeHostInput

func NormalizeHostInput(raw string) (string, error)

func ResolveAdaptiveAnyHost

func ResolveAdaptiveAnyHost() string

func ResolveAdaptiveLoopbackHost

func ResolveAdaptiveLoopbackHost() string

func SelectAdaptiveAnyHost

func SelectAdaptiveAnyHost(hasIPv4, hasIPv6 bool) string

func SelectAdaptiveLoopbackHost

func SelectAdaptiveLoopbackHost(hasIPv4, hasIPv6 bool) string

Types

type DefaultMode

type DefaultMode int
const (
	DefaultLoopback DefaultMode = iota
	DefaultAny
)

type OpenResult

type OpenResult struct {
	Listeners []net.Listener
	BindHosts []string
	Port      string
	ProbeHost string
}

func OpenPlan

func OpenPlan(plan Plan, port string) (OpenResult, error)

type Plan

type Plan struct {
	ProbeHost string
	// contains filtered or unexported fields
}

func BuildPlan

func BuildPlan(raw string, defaultMode DefaultMode) (Plan, error)

Jump to

Keyboard shortcuts

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