谁实际上使用了完整的 JID? [英] Who actually uses a full JID?
问题描述
通过 smack 登录 XMPP 服务器时,我只发送用户 ID/密码组合.
When logging in to an XMPP server via smack, I only send the userid/password combination.
服务器组件是否真的在完整的 JID 中使用了resource"参数?
Do server components actually use the "resource" parameter in a full JID?
例如阿里@某地/资源
发送它有什么好处?
推荐答案
如果您有多个客户端登录,这些资源很有用.
Resources are useful if you have multiple clients logged in.
例如,如果我在家中和工作中为每个连接使用不同的资源登录,那么我可以为每个连接设置我的状态.也许我在家,所以工作设置为xa,家设置为聊天.
For example, if I'm logged in at home and at work using a different resource for each connection, then I can have my presence set for each. Maybe I'm at home so work is set xa and home is set to chat.
当您拥有异构客户端并且您可以使用功能 (XEP-0115) 来区分客户端可以使用的功能时,资源真的很有用.
Resources can really be useful when you've got heterogeneous clients and you can use capabilities (XEP-0115) to distinguish the features the clients can use.
这篇关于谁实际上使用了完整的 JID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!