net

package
v0.0.0-...-f4dd3ec Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPortAvailable

func CheckPortAvailable(host string, port int) bool

func Dial

func Dial(network, addr string) (net.Conn, error)

func DialContext

func DialContext(ctx context.Context, network, addr string) (net.Conn, error)

func DialRetry

func DialRetry(ctx context.Context, network, addr string, maxRetry uint, checkInterval time.Duration) (conn net.Conn, err error)

func DialTimeout

func DialTimeout(network, addr string, timeout, checkInterval time.Duration) (net.Conn, error)

func FindFreePort

func FindFreePort(host string, startPort int) (int, error)

func ReservePort

func ReservePort(host string, port int) (listener net.Listener, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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