xmpp

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  uint64 = 1
	KB        = B << 10
	MB        = KB << 10
	GB        = MB << 10
	TB        = GB << 10
	PB        = TB << 10
	EB        = PB << 10
)
View Source
const (
	TypeVCardTemp byte = iota
	TypeVCard4
)
View Source
const NodeVCard4 string = "urn:xmpp:vcard4"

Variables

This section is empty.

Functions

func Close

func Close(component *xmpp.Component)

Close gracefully terminates the component and saves active sessions

func HandleIq

func HandleIq(s xmpp.Sender, p stanza.Packet)

HandleIq processes an incoming XMPP iq

func HandleMessage

func HandleMessage(s xmpp.Sender, p stanza.Packet)

HandleMessage processes an incoming XMPP message

func HandlePresence

func HandlePresence(s xmpp.Sender, p stanza.Packet)

HandlePresence processes an incoming XMPP presence

func NewComponent

func NewComponent(conf config.XMPPConfig, tc config.TelegramConfig, idsPath string) (*xmpp.StreamManager, *xmpp.Component, error)

NewComponent starts a new component and wraps it in a stream manager that you should start yourself

func SaveSessions

func SaveSessions()

SaveSessions dumps current sessions to the file

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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