开发者

Socket.IO : Forcing flash sockets, "No transport available"

PROBLEM :

I am having problems getting socket.IO to connect in some circumstances, so wanted to make sure that all of the transport methods were working fine. When I force flashflash sockets I get the error "No transport available". The WebSocketMain.swf file is located in the same directory as the html file.

I am using this code to connect to the socket,

var socket = new io.Socket(null,{port: 8086, rememberTransport:false, transports:['flashsock开发者_如何学Cet']}); 

EXAMPLE : http://thebeer.co/labs/realTime.php

(explore the source for more info, my JS is under the included socket.io pulgin script)


At least part of the problem is

if (window.WebSocket) return;

on line 1887 of socket.io.js.

It doesn't configure flash if WebSockets are already working. comment out that line if you need to test it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜