struct

XMPP::Config

Inherits Struct / Value / Object

Constructors

new(jid : String, password : String, host : String, port : Int32 = 5222, lang : String = "en", tls : Bool = true, skip_cert_verify : Bool = false, time_out : Int32 = 15, log_file : IO | Nil = nil, sasl_auth_order : Array(XMPP::AuthMechanism) = SASL_AUTH_ORDER, auto_presence : Bool = true, io_timeout : Int32 = 30, max_stanza_size : Int32 = XMLStreamReader::DEFAULT_MAX_ELEMENT_SIZE, tls_ca_certificates : Nil | String = nil, prefer_direct_tls : Bool = false, transport : XMPP::TransportMode = TransportMode::Tcp, url : Nil | String = nil)
Source

Instance methods

auto_presence?

auto_presence controls whether to automatically send initial presence after connection Set to false if you want to manually control presence (e.g., for invisible login)

Source
connect_timeout
Source
host
Source
host_explicit?

True when the caller supplied an explicit host, in which case SRV-based connection discovery is skipped.

Source
io_timeout
Source
lang
Source
log_file
Source
max_stanza_size
Source
parsed_jid
Source
password
Source
port
Source
prefer_direct_tls?

prefer_direct_tls opts into XEP-0368 connection discovery: when true and no explicit host is configured, the client looks up _xmpps-client/_xmpp-client SRV records and connects using direct TLS where the server offers it. Defaults to false (STARTTLS on port 5222).

Source
sasl_auth_order

Ordered SASL mechanisms offered to the selector. Defaults to the SCRAM-only SASL_AUTH_ORDER. Pass LEGACY_SASL_AUTH_ORDER explicitly when compatibility with PLAIN, DIGEST-MD5, or ANONYMOUS is required.

Source
skip_cert_verify?

skip_cert_verify can be set to true to allow to open a TLS session and skip verification of SSL certs

Source
tls?
Source
tls_ca_certificates
Source
transport

Connection transport: TransportMode::Tcp (default), WebSocket (RFC 7395), Bosh (XEP-0206), or Auto (TCP first, then XEP-0156 discovery).

Source
url

Explicit connection endpoint for the WebSocket (RFC 7395) or BOSH (XEP-0206) transports: ws:// or wss:// for WebSocket, http:// or https:// for BOSH. Overrides discovery; falls back to a derived default when nil.

Source