xep0199

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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
	SendInterval time.Duration
}

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

func (*Config) UnmarshalYAML added in v0.3.2

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML satisfies Unmarshaler interface.

type Ping

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

Ping represents a ping server stream module.

func New

func New(config *Config, disco *xep0030.DiscoInfo) (*Ping, chan<- chan bool)

New returns an ping IQ handler module.

func (*Ping) CancelPing added in v0.3.2

func (x *Ping) CancelPing(stm stream.C2S)

CancelPing cancels a previous scheduled ping.

func (*Ping) MatchesIQ

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

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

func (*Ping) ProcessIQ

func (x *Ping) ProcessIQ(iq *xmpp.IQ, stm stream.C2S)

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

func (*Ping) SchedulePing added in v0.3.2

func (x *Ping) SchedulePing(stm stream.C2S)

SchedulePing schedules a new ping in a 'send interval' period, cancelling previous scheduled ping.

Jump to

Keyboard shortcuts

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