Tag Archives: websocket

Proper settings for socket.io flash (and other) fallbacks for clients using a proxy

Salam (means hello) :)

I have the following basic settings in my node.js application. But it doesn't work for clients who are connected using a proxy or are behind a firewall. I want to know what should I add to get socket.io fallback to work as expected:

Server side:

var io = require('socket.io').listen(3000, {
    log: 3,
    flashPolicyServer: true,
    transports: ['htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket']
});

io.sockets.on('connection', function(){
    // my event handlers
});

Client side:

WEB_SOCKET_SWF_LOCATION = "oath/to/my/copy/of/WebSocketMain.swf";
var socket = io.connect('http://localhost:3000');
// my event handlers

Proper settings for socket.io flash (and other) fallbacks for clients using a proxy

Salam (means hello) :)

I have the following basic settings in my node.js application. But it doesn't work for clients who are connected using a proxy or are behind a firewall. I want to know what should I add to get socket.io fallback to work as expected:

Server side:

var io = require('socket.io').listen(3000, {
    log: 3,
    flashPolicyServer: true,
    transports: ['htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket']
});

io.sockets.on('connection', function(){
    // my event handlers
});

Client side:

WEB_SOCKET_SWF_LOCATION = "oath/to/my/copy/of/WebSocketMain.swf";
var socket = io.connect('http://localhost:3000');
// my event handlers