libping

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-2.0 Imports: 11 Imported by: 2

README

libping

Unix non-privileged ICMP ping implementation.

TCP ping implementation.

Documentation

Index

Constants

View Source
const MaxTimeout = 5000 * time.Millisecond

Variables

View Source
var FdControl func(fd int) = nil

Do something for fd

Functions

func IcmpPing

func IcmpPing(address string, timeout time.Duration, payload []byte) (time.Duration, error)

IcmpPing used to take icmp ping. address must be a pure IP address. payload for send. If failed, it will returns -1, err.

func TcpPing added in v0.4.0

func TcpPing(address, port string, timeout time.Duration) (latency time.Duration, 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