class XMPP::ClientStateIndication

Overview

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 / 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

Defined in:

xmpp/client_state_indication.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def active #

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


[View source]
def inactive #

inactive tells the server the client moved to the background.


[View source]