@xmpp/resource-binding
v0.14.0
Published
XMPP resource binding for JavaScript
Readme
resource-binding
Resource binding for @xmpp/client.
Included and enabled in @xmpp/client.
Usage
Resource is optional and will be chosen by the server if omitted.
string
import { xmpp } from "@xmpp/client";
const client = xmpp({ resource: "laptop" });function
Instead, you can provide a function that will be called every time resource binding occurs (every (re)connect).
import { xmpp } from "@xmpp/client";
const client = xmpp({ resource: onBind });
async function onBind(bind) {
const resource = await fetchResource();
return resource;
}