Socket.io does not work on Firefox & Chrome

后端 未结 3 1068
谎友^
谎友^ 2021-01-15 04:37

I\'m trying to develop a simple chat application. Here is my chat.js file.

var app = require(\'http\').createServer(handler)
, io = require         


        
3条回答
  •  抹茶落季
    2021-01-15 04:55

    I encountered the same issues when trying to publish to AppFog. It's caused by websockets not being supported by AppFog yet, so your fix worked by forcing socket.io to use long polling/AJAX. AppFog is working on supporting websockets according to their website, but no dates have been given.

    Most cloud PaaS providers that I have found do NOT support websockets yet unfortunately. One notable exception that I am testing out now is Nodejitsu: http://nodejitsu.com/

提交回复
热议问题