Is it possible JIDs with only different resources joining same multi-user chat room

爱⌒轻易说出口 提交于 2020-01-05 04:25:12

问题


In xmpp, following 2 users could join multi-user chat(MUC) or subscribe to same pub-sub node?

public@service.com/user1 public@service.com/user2


回答1:


When joining an anonymous MUC room, a room where others do not know the "real" JID of others in the room, the connecting user provides their own JID.

When joining a non-anonymous room the users provide their full JID which is transmitted then to all occupants.

In either case there is nothing to prevent the user from joining with the same bare JID but different resources. More details on the MUC protocol, specifically around joining a room can be found in XEP-0045: Basic MUC Protocol.

When subscribing via pub-sub the client can provide either a full JID or a bare JID (no resource) when subscribing. Details for this can be found in the pub-sub XEP, XEP-0060




回答2:


In most MUC implementations, you must join the room with a different nickname for each of your resources. If you use the same nickname for the second resource, you are likely to get a conflict error.



来源:https://stackoverflow.com/questions/9977661/is-it-possible-jids-with-only-different-resources-joining-same-multi-user-chat-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!