pinger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pinger

type Pinger struct {
	MTU int
	// contains filtered or unexported fields
}

func NewPinger

func NewPinger(addr string, mtu int, timeout time.Duration) *Pinger

func (*Pinger) Close

func (p *Pinger) Close() error

func (*Pinger) OnRecv

func (p *Pinger) OnRecv(cb func(*icmp.Message, time.Time) error)

func (*Pinger) Send

func (p *Pinger) Send(peer *net.UDPAddr, payload []byte) (uint64, time.Time, error)

func (*Pinger) Start

func (p *Pinger) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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