Difference between revisions of "XMPP Resources"
Latest revision as of 01:07, 17 December 2020
In XMPP, you are able to log in several client programs simultaneously. You don't need to have different XMPP accounts for work and for home. You can chat at home, then go to work, log in again with the same JID and your home XMPP client will not go offline after that. This is because XMPP Accounts (JIDs) have a component called the "resource part" which allows multiple clients to share the same bare JID (as long as they have unique resource parts).
Resources allow individual clients to be addressable on the network, this way the server can send messages to all of your online clients or address a particular client (for instance, to send a file only to your phone). Specifying a fixed resource like "Home" or "Work" is generally discouraged because of security concerns. Because servers may also override resources with random routing data, if you must display individual clients to the user (for example, to ask if they want to send a file to a friends phone or laptop), information about the device type from XEP-0030: Service Discovery or software version information from XEP-0092: Software Version should be displayed instead. See also this page.