libping

package module
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: GPL-2.0 Imports: 15 Imported by: 2

README

libping

Unix non-privileged ICMP ping implementation.

TCP ping implementation.

Documentation

Index

Constants

View Source
const DefaultTimeout = 5000 * time.Millisecond

Variables

This section is empty.

Functions

func IcmpPing

func IcmpPing(
	ctx context.Context,
	addr M.Socksaddr,
	payload []byte,
	controlFunc control.Func,
) (time.Duration, error)

IcmpPing used to take icmp ping. If failed, it will return -1, err.

func TcpPing added in v0.4.0

func TcpPing(ctx context.Context, addr M.Socksaddr, controlFunc control.Func) (latency time.Duration, err error)

TcpPing use TCP to probe `addr`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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