Socket.io没有明显的原因恢复到XHR / JSONP轮询

编程入门 行业动态 更新时间:2024-10-28 08:28:12
本文介绍了Socket.io没有明显的原因恢复到XHR / JSONP轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我认为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轮询

本文发布于:2023-11-24 01:21:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623460.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:原因   io   Socket   轮询   JSONP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!