ping

package
v0.0.0-...-fab7de7 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingTCP

func PingTCP(peer string, realm string, turnServerAddr string, username string, password string, npings int) error

func PingUDP

func PingUDP(peer string, realm string, turnServerAddr string, username string, password string, npings int) error

func Stun

func Stun(addr string) error

Types

type Ping

type Ping struct {
	Size   int
	Source net.Addr
	RTT    time.Duration
}

type Pinger

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

func NewPinger

func NewPinger(ip string) *Pinger

func (*Pinger) Close

func (p *Pinger) Close()

func (*Pinger) Ping

func (p *Pinger) Ping() chan Ping

func (*Pinger) Start

func (p *Pinger) Start() error

func (*Pinger) WriteTo

func (p *Pinger) WriteTo(msg []byte, addr net.Addr) (int, error)

Jump to

Keyboard shortcuts

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