xep0199

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Send         bool `yaml:"send"`
	SendInterval int  `yaml:"send_interval"`
}

Config represents XMPP Ping module (XEP-0199) configuration.

type Ping

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

Ping represents a ping server stream module.

func New

func New(config *Config, stm stream.C2S) *Ping

New returns an ping IQ handler module.

func (*Ping) MatchesIQ

func (x *Ping) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the ping module.

func (*Ping) ProcessIQ

func (x *Ping) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a ping IQ taking according actions over the associated stream.

func (*Ping) RegisterDisco added in v0.3.0

func (x *Ping) RegisterDisco(discoInfo *xep0030.DiscoInfo)

RegisterDisco registers disco entity features/items associated to ping module.

func (*Ping) ResetDeadline

func (x *Ping) ResetDeadline()

ResetDeadline resets send ping deadline.

func (*Ping) StartPinging

func (x *Ping) StartPinging()

StartPinging starts pinging peer every 'send interval' period.

Jump to

Keyboard shortcuts

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