向组件发送消息?
如何向组件发送xmpp消息?如果我的组件名称是“abc.domain.net”,在我的 xmpp 客户端(spark)中,我只需添加用户“abc.domain.net”?有没有这样的例子,使用whack来听消息?
我尝试添加 abc.domain.net (组件)作为 Spark 内的烘焙机。尝试发送消息,但在 whack processPacket() 中,当我进行调试时它没有触发任何内容
how to send xmpp message to component? if my component name is 'abc.domain.net', in my xmpp client(spark), i just add user 'abc.domain.net' ? any such example that using whack to listen to message?
I tried add abc.domain.net (component) as roaster inside spark. try send message, but inside whack processPacket(), it didn't trigger anything when i do debugging
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您甚至不需要添加用户 abc.domain.net,您只需向 abc.domain.net 发送消息、iq 或状态即可。
我不确定重击,但组件基本上是“超级客户端”,它们不实现常规客户端的任何规则:您可以从字段重写,它们没有内置的存在或名册。
所以您发送给组件的任何节都应该被它接收。您可以实现该组件,以便它响应特定的节并按照您想要的方式对其进行操作。
You don't even need to add the user abc.domain.net, you can just send messages, iq or presence to abc.domain.net.
I'm not sure about whack, but components are basically "super-client", who don't implement any of the rules that regular clients have : you can rewrite from fields, they don't have presence or rosters built in.
So any stanza you send to a component should be received by it. You can them implement the component so it responds to specific stanzas and acts upon them the way you want.
另外,我想补充一点,您可以在任何客户端中将组件用户添加到您的好友中,而无需在任何地方创建它。用户名只需后跟组件的子域即可。组件端未经授权的事件您可以向其发送消息。
Also, I would like to add that you can add a component user to your buddies in any client without creating it anywhere.The user name just needs to be followed by a subdomain of a component. Event without authorization on a component side you can send messages to it.