strophe无法通过websocket连接openfire [英] strophe failed to connect openfire by websocket
问题描述
OF版本:3.9.1,我可以使用pidgin登录.
OF version:3.9.1, I can use pidgin to log on.
使用strophe.js时,我先尝试了BOSH,但失败了,可能是我没有正确设置apache设置.然后,我决定尝试使用websockets,这是我的首选,但是,我收到以下错误消息:
When using strophe.js, I tried BOSH first, but it fails, probably I didn't get apache settings right. Then I decide to try websockets, and this is my preferred option, however, I got the following error message:
与'ws://ikan.tk:7070/ws/server'的WebSocket连接失败:在建立连接之前,WebSocket已关闭.
WebSocket connection to 'ws://ikan.tk:7070/ws/server' failed: WebSocket is closed before the connection is established.
然后状态始终为正在连接".
then the status is "connecting" always.
问题:
-
Websocket的URL是什么?使用http绑定端口(7070)还是客户端端口(5222)?是否要遵循任何路径(例如/ws/server)?
what's the URL for websocket? using http-bind port (7070), or the client port (5222)? Any path (like /ws/server) to be followed ?
我在Windows上使用OF 3.9.1,未安装插件. OF 3.9.1默认情况下是否支持WS,或者我必须安装一些插件,或者我需要做一些配置项目?
I'm using OF 3.9.1 on windows, no plugin installed. Does OF 3.9.1 support WS by default, or I have to install some plugin, or there's some configuration items I need to do?
提前谢谢!
推荐答案
AFAIK,
1)OpenFire上的websocket的URL为ws://of-server:7070/ws
,具有默认配置(请参见下文).
1) The URL for websocket on OpenFire is ws://of-server:7070/ws
with default configuration (see below).
2)您需要为OpenFire安装" WebSockets插件"插件,然后才能在属性中配置websocket的路径(默认为" ws ") 服务器> WebSockets"标签下的页面.
2) You need to install the "WebSockets Plugin" plugin for OpenFire, then you can configure the path of the websocket ("ws" is default) in properties page under the "Server > WebSockets" tab.
这篇关于strophe无法通过websocket连接openfire的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!