I\'ve implemented a chrome extension which allow to use XMPP chat over BOSH connection with punjab server running on a remote server. It is implemented using javascript Strophe
You need to understand how JIDs work, what priorities are and how to send messages.
A JID is of the form: user@domain/resource
The JIDs of logged in users have to be unique. Typically when you use a web client you assign a random resource to each session so as to not have clashes.
Now, when a user sends a message the to
attribute of the
stanza specifies the recipient of the message. If the resource is part of the recipient then only that JID will receive the message. If the recipient is a bare JID (user@domain) then priorities come into play (see here):
You can set the priority (an integer in [-128, 127])when you send your presence (see the rfc for full spec) for example:
Learning XMPP
1