Emits a serialized nonza (or re-sent stanza) towards the server.
Whether the current stream's features advertised
The full JID bound when the SM session was enabled.
Whether
Whether the current session was established by resumption.
Whether a
The live SM state. Treat as read-only outside of tests.
Remove persisted state (clean close, logout, failed resume).
true if persisted state allows attempting
Set the storage key (from the user's bare JID) and load any persisted resumable state. Call before deciding between resume and fresh bind.
The user's JID (a full JID is reduced to its bare form).
true once
Overridable event hook: an SM session was established via
Overridable event hook:
Optional_view: StanzaView
The
Optional_resumeFailed: boolean
true when the failure answered a
Call when the stream is about to be closed cleanly: sends a final so the server doesn't redeliver stanzas that were actually received (RECOMMENDED, XEP-0198 §4), clears persisted state (a cleanly closed stream is not resumable, XEP-0198 §Stream Closure) and deactivates the engine, so nothing sent during teardown is tracked or re-persisted.
Process one inbound top-level element: count it if it is a countable
stanza (when the session is enabled), otherwise handle it as an SM
nonza (
Count an inbound top-level stanza by name. Adapters call this from their dispatch loop for every inbound child element — non-countable names and inactive sessions are no-ops, so no StanzaView needs to be built for the common case.
The element's local tag name.
Overridable event hook: the previous session was resumed via
Send an unrequested ack request
Reset the in-memory engine (e.g. from Connection.reset()). Persisted state is NOT touched — clearing storage is tied to intent (clean close, logout, failed resume), not to connection reuse.
Send
The full JID that was just bound.
Send
Track an outbound top-level element. Called for every element that
enters the send queue; non-countable elements are ignored here.
Active from the moment
The XEP-0198 Stream Management engine.
Hosted by Connection (page) or by the shared-connection worker; fed StanzaViews by a thin per-environment adapter. Emits nonzas through the injected
sendRawfunction.