class

XMPP::Client

Inherits XMPP::StreamManagement / XMPP::EventManager / XMPP::StreamClient / XMPP::Sender / Reference / Object

Constructors

new(config : XMPP::Config, router : XMPP::Router)
Source

Instance methods

bare_jid

Bare JID (node@domain) of the account, derived from the bound JID when available and falling back to the configured JID.

Source
bound_jid

Full JID assigned to the active session by RFC 6120 binding or Bind 2.

Source
cipher
Source
connect

connect triggers actual TCP connection, based on previously defined parameters. connect simply triggers resumption, with an empty session state.

Source
disconnect
Source
last_resume_succeeded?
Source
request(iq : Stanza::IQ, timeout : Time::Span = 5.seconds) : Stanza::IQ | Nil

request performs a synchronous IQ request/response round-trip and returns the matching result stanza (or the IQ error stanza) within the given timeout. Returns nil if no response arrives before the timeout.

Source
resume(state : SMState)

Resume attempts resuming a Stream Managed session, based on the provided stream management state

Source
send(packet : Stanza::Packet)

sends marshal's XMPP stanza and sends it to the server.

Source
send(packet : String)

send sends an XMPP stanza as a string to the server. It can be invalid XML or XMPP content. In that case, the server will disconnect the client. It is up to the user of this method to carefully craft the XML content to produce valid XMPP.

Source
session

Session gathers data that be access by users of this Shard

Source
tls_verified?
Source
tls_version

TLS introspection (RFC 7590 ยง3.6). Delegate to the active session.

Source
unacknowledged_stanza_count

Components and custom stream clients that do not implement XEP-0198 retain the zero/false defaults.

Source