ping

package
v0.0.0-...-ee83f8d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LatencyHandler

type LatencyHandler func(time.Duration)

LatencyHandler receives latency information

type Ping

type Ping struct {
	Interval time.Duration
	Timeout  time.Duration

	LatencyHandler
	// contains filtered or unexported fields
}

Ping structure holds ping service state

func (*Ping) HandleIQ

func (ping *Ping) HandleIQ(iq *xmpp.IQ)

HandleIQ checks for incoming pongs

func (*Ping) HandleStanza

func (ping *Ping) HandleStanza(s xmpp.Stanza)

HandleStanza implements Handler interface

func (*Ping) Offline

func (ping *Ping) Offline(err error)

Offline implements Handler interface

func (*Ping) Online

func (ping *Ping) Online(s xmpp.Session)

Online implements Handler interface

func (*Ping) Ping

func (ping *Ping) Ping()

Ping sends a ping request to the server

type XMPPPing

type XMPPPing struct {
	XMLName xml.Name `xml:"urn:xmpp:ping ping"`
}

Jump to

Keyboard shortcuts

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