我认为Socket.IO应该选择最好的方法来查找系列中服务器的连接,
I think Socket.IO should choose The best method to find connection with the server in the series ,
Websocket , FlashSocket and then JSONP
但是我的服务器在节点0.4.9的顶部运行socket.io 0.7.7(在用cygwin编译的窗口上)进入XHR / JsonP轮询没有任何明显的原因。我已经检查了80-89的所有端口以确保,问题始终保持不变。
but my server which is running socket.io 0.7.7 on the top of node 0.4.9 (on windows compiled with cygwin) goes to XHR/JsonP polling without any apparent reason. I have checked on all ports from 80 - 89 just to make sure , and the problem remains the same all the time.
我还检查了两侧的控制台日志。 Firebug给出没有错误只是向我显示XHR获取请求。
I also checked for console logs in both the sides. Firebug Gives No error just shows me the XHR get requests instead.
并且在服务器控制台上它给了我:
and On the Server Console it gives me :
info - socket.io started debug - client authorised // i dunno why this is occuring though info - handshake autorised 154845454664764 setting request Get/socket.io/1/xhr-polling/154845454664764 debug - setting poll timeout。 。 。等等任何理由的人?
. . . and so on Any reason in mind guys ??
推荐答案您可能正在使用禁用了WebSockets的Firefox 。
警告:除此之外,Firefox 4和5中默认禁用WebSockets目前的一个关键原因是在协议设计中发现了一个安全问题。目前不建议在生产环境中使用这些版本的 Firefox中的WebSockets。 如果您仍想尝试使用WebSockets,可以通过打开about:config并将network.websocket.enabled 首选项设置为true。您还需要将 network.websocket.override-security-block首选项设置为true,以便允许初始化WebSocket连接。
Warning: Among other things, a key reason WebSockets is currently disabled by default in Firefox 4 and 5 is the discovery of a security issue in the protocol's design. Using WebSockets in those versions of Firefox in a production environment is not recommended at this time. If you still wish to experiment with WebSockets, you may do so by opening about:config and setting the network.websocket.enabled preference to true. You will also need to set the network.websocket.override-security-block preference to true in order to allow initializing a WebSocket connection.
更多推荐
Socket.io没有明显的原因恢复到XHR / JSONP轮询
发布评论