class

XMPP::ClientStateIndication

Inherits Reference / Object

ClientStateIndication is a high-level client for XEP-0352 - Client State Indication.

A client signals whether it is in the foreground or background by sending the empty stream nonzas <active/> / <inactive/> in the urn:xmpp:csi:0 namespace. The server may use this to stop or throttle traffic to backgrounded clients. There is no reply and no discovery step.

csi = XMPP::ClientStateIndication.new(client) csi.inactive # move to the background csi.active # return to the foreground

See: https://xmpp.org/extensions/xep-0352.html

Constructors

new(client : Client)
Source

Instance methods

active

active tells the server the client has returned to the foreground.

Source
inactive

inactive tells the server the client moved to the background.

Source