0

我已经安装了开火服务器,http://domain.com/http-bind也很好。并且 strophe 也可以正常工作。尝试使用此设置指南进行设置:[Candy 设置指南][1]。

我被困在 Connecting 中。

Candy Installation Guide[1]:http ://candy-chat.github.io/candy/#setup 《糖果设置指南》

  Strophe is connecting.
  SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind'       to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8'  ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
Strophe is disconnecting.

上面是strophe的显示输出,我把domian改成了example.com

   $(document).ready(function() {
   Candy.init('http://example.com/http-bind/', {
   core: {
   debug: true,
   autojoin: ['example@conference.example.com', 'hrirks@conference.example.com']
   },
   view: { resources: 'res/' }
   });

   Candy.Core.connect();
});

我将 index.html 复制到糖果根目录。我在萤火虫控制台中收到以下消息,响应

  <html>
  <head><title>Openfire HTTP Binding Service</title></head>
  <body><font face="Arial, Helvetica"><b>Openfire <a href="http://www.xmpp.org/extensions/xep-0124.html">HTTP Binding</a> Service</b></font></body>
  </html>
 And got this in POST
  <body rid='3334381189' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
4

3 回答 3

0

您需要在初始化后调用 Candy.Core.attach 或 Candy.Core.connect 并包含参数。

Candy.Core.connect(jidOrHost, password, nick);
于 2014-03-27T21:21:26.540 回答
0

请检查您是否缺少确切的端口,就我而言,它是 domain_name:5280/bosh

于 2019-10-14T05:07:18.467 回答
0

Openfire有一个插件,它提供了 Candy 的集成版本。安装插件后,您无需进行任何配置即可使其正常工作。

旁注:Candy 已经很久没有维护了。结果,没有解决各种重要问题。你可能最好使用 Converse(类似于“candy”插件,可以通过使用 Openfire 的“ inVerse”插件将其添加到 Openfire

于 2019-12-10T07:54:57.160 回答