问题标签 [strophe]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - XMPP MUC问题
我正在使用XMPP
strope.js 和 openfire。我有一个疑问,如何让房间里已经存在的所有成员???
More Priece:
当我刷新页面并将我的存在节发送到房间时。我从房间里得到了我的存在,我展示了加入的房间。但是如何得到presence stanza
所有已经在房间里的人。
编辑:
让我分情况解释一下,假设A和B想要群聊。首先 A 进入房间,他看到自己在房间里。然后 B 进入房间,所以 A 得到 B 的存在节,现在在 A 侧,房间里有 A 和 B。但在 B 侧,它只显示房间中的 B。
现在 A 刷新页面,B 获得存在节,现在 B 方都在房间里,但 A 方现在只有 A 在房间里。
xmpp - XMPP网页客户端模拟多账号
如何在 jsjac 或 strophe 中模拟多个帐户。
openfire - Strophe.attach 不工作 - 我在本地使用 openfire
我正在尝试实现 XMPP 客户端。我正在使用 BOSH 连接管理器,可以运行 Strophe.connect 但不能运行 Strophe.Attach。我试过增加 RID,但没有效果..有什么帮助吗?这里没有错误,但从未通过附加方法到达 Strophe.Status.CONNECTED,因此我无法发送 IQ 或 Presence。
这是我的代码尝试{
编辑
谢谢埃里克和查理。
所以我采用了最新的 Strophe.js,现在 Attached 状态确实有效。但是连接会立即断开。我什至无法获取名册。
我们可以像使用 connection.connect() 一样使用 Connection.attach() 做所有事情,对吧?
有什么想法吗?
javascript - 需要 Strophe Javascript Pubsub 帮助
我需要使用 Strophe 的发布订阅服务来访问我同事设置的节点。
我正在尝试访问已设置的服务器上的节点 /Communities/
有谁知道从哪里开始使用 Strophe,我已经下载了测试并查看了 api,在它有点令人困惑之前没有使用它。有谁知道我可以使用的教程或示例?
任何帮助将不胜感激
谢谢
javascript - architecture to Facebook-chat from a webpage, (XMPP? Strophe? Punjab?)
I would like to implement FB-chat inside a webpage. I looked around in Facebook API, i found out that chat is allowed only using XMPP. First I tried to connect to FB-chat using Pidgin and it worked fine. My conclusion was that FB-chat server is acting as the XMPP server. Is this true?
I read about XMPP, it seems that an open TCP connection should be established between the client and the server to exchange the XML stanzas which is not possible from a website (over JavaScript and without plugins) since only http requests/responses can be exchanges, no TCP connection there. This means that there should be some kind of a proxy in between, and as for authentication, FB API suggests to use the X-FACEBOOK-PLATFORM SASL (not the DIGEST MD5, since there is a proxy). I didn't find a clear tutorial or steps how to do so, help here is appreciated.
A bit more research about XMPP client from the web or browser, I saw that I am supposed to use a library called Strophe (based on BOSH protocol) and in other answers some kind of connection manager called Punjab. I read about this BOSH protocol, it seems to be the solution but in some places I found out that it is not allowed in FB (I am not sure how correct is this info though). I tried to setup these but i was totally confused how to begin and what I am really supposed to do.
For the strophe, I didn't find a real tutorial how to implement it, and in what i found, they suggest to first setup a jabber server like ejabberd (I didnt get the need for that).
My question is:
Can somebody suggest an architecture that I should implement to achieve my goal?
So will there be: webpage ->(HTTP) -> Strophe -> (TCP) -> FB-chat OR will it have an XMPP server in between and why?
I would appreciate any answer to any of my questions. Please suggest some links to how to implement all these stuff. I am totally new to all this which made me lost for more than a week now.
If somebody already did this, please help. Thanks a lot.
Sabah
javascript - 使用 strophe,旁遮普语的 facebook 聊天
使用我上一个问题的答案和另一篇文章,我尝试从浏览器实现 facebook-chat。这是我所做的:
- 在 ubuntu 虚拟机上,我有python 2.6.5、python-twisted-conch 1:10.0.0-2、python-twisted-names 10.0.0-1、python-twisted-web 10.0.0-1和python-已经安装了twisted-words 10.0.0-2。我没有安装 jabberd2 服务器,我假设 facebook 服务器是我的 Jabber/XMPP 服务器。我也没有安装 pyopenssl。
- 从这里下载和解压旁遮普语
- 使用以下命令运行它
有时它告诉进程已经在 PID xxx 下运行,但大多数时候回复是
这是否意味着旁遮普正在运行?
在 punjab.tac 文件中,根据这篇文章,我将 root.putChild 行更改为
另一方面,我在主机(windows xp)上运行了一个apache服务器来托管我使用Strophe的网页。在 apache 配置文件httpd.conf 中,我使用以下命令将 BOSH 请求代理到 5280 端口的旁遮普语:
请注意,主机和虚拟机是桥接的,因此两者都从路由器获取它们的 IP 地址,并且每个都可以 ping 另一个。我也没有安装 jabber/xmpp 服务器,或者
为了测试,我使用 strophe 的基本示例作为我的网页basic.html和basic.js,JID: FB_username@chat.facebook.com 和密码: FB_password。
我得到以下信息:
有什么错误或遗漏吗?请帮忙,因为除了一些关于这个问题的帖子之外,我没有找到真正的文档。谢谢沙巴
_
javascript - XMPP - 示例第 3 章“使用 JavaScript 和 jQuery 进行专业 XMPP 编程”不起作用
我只是 XMPP 的新手,我正在制作第一个“HELLO”代码。请花点时间查看以下代码(.zip 在本主题的末尾):
根据文档和代码,它必须说“连接已建立”或“连接终止”。但事实并非如此。我试着把alert("It runs to here!");
每一行代码都放进去,它仍然是 alert()。当我将它放入 bind("connected") 和 bind("disconnect") 时,它不再发出警报。所以我猜代码不能运行到那里。我以前从来没有做过,而且很少有这方面的文件,所以我现在不知道该怎么办。
问题:请你们看看它,告诉我哪里出了问题?我自己还在调试它!
额外信息:这些是我的 web 文件夹中的内容(我害怕丢失 javascript 框架文件)。所有 js 文件都是最新版本。
- 索引.html
脚本/
- jQuery.js
- jQueryUI.js
- strophe.js
- flensed.js
- flXHR.js
- flXHR.swf
- flXHR.vbs
- swfobject.js
- 更新播放器.swf
- 检查播放器.js
css/
- 不重要...
这是我的代码,请花点时间查看:http: //xx3004.kodingen.com/XMPP
我将不胜感激任何帮助。
[X]
javascript - 如何使用内置的 Bosh 支持配置 Openfire 以接受 XMPP 聊天客户端?
了解配置 Openfire Server 以使用它的任何教程或资源,Bosh 支持使用 stroph 开发的 XMPP 聊天客户端。Openfire 服务器是与 Spark 和 Pidgin 一起使用的现有公司聊天服务器。
gwt - 使用 GWT-Strophe 的 GWT XMPP 客户端
我正在使用GWT-Strophe连接到我的 XMPP 服务器。一切进展顺利,我能够连接到我的 XMPP 服务器并向其他用户发送消息。我在接收消息时遇到问题。我正在尝试复制 Strophe echobot 示例,但是当收到消息时,我的处理程序中的代码没有被执行。
这是我用来连接和注册处理程序的代码:
javascript - strophe.js PEP 处理程序未正确附加
我一直在使用 PEP 插件(在此处找到:https ://github.com/flosse/strophejs-plugins/blob/master/pep/strophe.pep.js )连接到用户节点但是我遇到了一些麻烦。当我的连接块被调用时,我执行以下操作:
当我从我尝试访问的节点的 JID 收到订阅回(因此具有双向订阅)时,我执行:
JID 和节点都有效的地方。我在控制台中收到 SUCCESS 但是事件处理程序 onMessage 未正确附加。我有调试集,所以我可以看到传入和传出的节,我没有从节点收到任何东西(我知道这是定期发布的)。我不太确定为什么会这样。
如果我从连接的块中删除所有内容并简单地从 Web 控制台手动创建双向订阅并将 XMPP.connection.pep.subscribe 添加到该现在为空的块中,它工作正常。
我尝试了多个 PEP 和 pubsub 插件并获得了相同的行为。我遇到了障碍,非常感谢任何人的意见!谢谢!