如何让客户了解 Smack 中新的 HostedRoom?

发布于 2024-08-17 02:34:09 字数 102 浏览 3 评论 0原文

我正在与 Openfire 和 Smack 合作,目前正在创建新的系统 MultiUserChat 房间。如何告诉客户端服务器上已创建(删除)了新的系统空间? (我需要客户修改他们的花名册)

I am working with Openfire and Smack, currently creating new system MultiUserChat rooms. How I tell clients that new system room had been created(deleted) on the server? (I need clients to modify their's Rosters)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

未央 2024-08-24 02:34:09

这是一个“挑战”。服务器不会向客户端发送消息来通知新房间 - 例如用户的状态消息。客户有责任探索服务(如“会议”)并寻找新房间。

因此,适用于所有可能客户的通用解决方案是行不通的。如果您自己开发客户端,则可以实现额外的通知服务。这需要实现一个 openfire 插件,该插件侦听“房间修改”事件并向您的客户端发送一条自定义消息,该消息将响应更新房间列表。

It's a 'challenge'. A server doesn't send a message to the clients to inform about new rooms - like the presence messages for users. It's the clients responsibility to explore the service (like 'conference') and look for new rooms.

So a general solution for all possible clients will not work. If you developed the client by yourself, you could implement an additional notification service. That would require implementing an openfire plugin, that listens to 'room modification' events and sends a custom message to your clients that will react with updating the room list.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文