我已经安装了开火服务器,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'/>