【问题标题】:Using socket.io in Cloud9 always get the xhr-polling transportation methodCloud9中使用socket.io总是得到xhr-polling传输方式
【发布时间】:2012-06-20 12:41:12
【问题描述】:

我正在开发一个使用socket.io的应用程序,但它总是回退到xhr轮询传输方法,我不明白为什么。

我用的是Chrome,但是我已经用其他浏览器测试过了,还是用xhr轮询传输方式。

我在 c9.io 中使用 Cloud9 IDE。

你见过这种行为吗?

【问题讨论】:

  • 您使用任何代理吗?
  • 我猜不是。我将应用程序移至安装了 nodeJs 的本地主机,一切正常。所以也许它与Cloud9有关。我想知道是否有人能够通过 Socket.io 和 Cloud9 使用 websocket 方法传输。
  • 那么 localhost 的成功如何证明你没有使用代理连接到外部世界呢? )
  • 我在 Cloud9 上遇到了同样的问题 - 我认为这是由于他们的服务器端代理系统

标签: node.js xmlhttprequest websocket socket.io


【解决方案1】:

Cloud9 IDE只支持herokuhttps://devcenter.heroku.com/articles/using-socket-io-with-node-js-on-heroku这样的xhr轮询传输方式

【讨论】:

    猜你喜欢
    • 2015-05-04
    • 2019-05-09
    • 2011-09-10
    • 2013-08-01
    • 2013-04-06
    • 2012-03-03
    • 2013-10-09
    • 2016-10-17
    • 2013-04-03
    相关资源
    最近更新 更多