Closes the stream (</stream:stream>) and the socket.
Resolves once the socket is closed.
Sends an <iq> request and waits for the correlated response.
'get' or 'set'.
The request payload element (e.g. a <query>).
Optionalopts: { id?: string; timeoutMs?: number; to?: string }
Optional to, explicit id, and per-request timeoutMs.
The response <iq> element.
Async iterable of inbound chat XmppMessages (pubsub events are routed to pubsub).
Async iterable of inbound XmppPresence updates.
Publishes an item to a pubsub node (PEP on your own account when no service is given).
The node id.
The item payload: an XmlElement, a raw-XML string (parsed), or plain text (wrapped in a carrier element).
Optionalopts: { itemId?: string; service?: string }
Optional service (publish to a pubsub component instead of PEP) and itemId.
The published item's id.
Async iterable of inbound PubSubEvents.
Sends a chat message.
Recipient, body, and optional type/subject/thread/id.
The message id that was sent.
Sends a raw stanza element (escape hatch).
An XmlElement, or a plain { name, attrs?, children? } object.
Resolves once written.
Broadcasts (or directs) a presence update.
The friendly presence state.
Optionalopts: { priority?: number; status?: string; to?: string }
Optional free-text status, numeric priority, and directed to.
Resolves once the presence stanza is written.
Subscribes to a pubsub node; events arrive via pubsub.
The pubsub service (a component JID, or your bare JID for PEP).
The node id.
The subscription id, when the server assigns one.
A live XMPP session bound to one TCP/TLS connection.
Obtain one from connect. A background pump routes inbound stanzas, so sending, receiving, and request-reply can all be in flight at once. It is an
AsyncDisposable, soawait usingcloses it cleanly (sending</stream:stream>first).Since
1.0.4