pinger

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 8 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) Echo added in v1.1.0

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

func (*Pinger) Reply added in v1.1.0

func (p *Pinger) Reply(message *icmp.Message) (time.Time, error)

Reply waits for an ICMP reply and fills the message with the response.

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