Socket.io for NodeJS doesn't seem to work as a websocket server
For some reason, socket.io ALWAYS fallback to the long polling and if I force the websocket transport layer, it will error out:
failed: Connection closed before receiving a handshake response
The right ports are open. I'm using the chat example from socket.io. I set up the server on http://jmi.io:3000. As you can see, it works fine with a beautiful long polling channel but now try the websocket connection from a websocket client and...
WebSocket connection to 'ws://jmi:3000/' failed: Connection closed before receiving a handshake response
I have only one node single threaded and have the exact same package.json than in the chat example repo.
{
"name": "socket-chat-example",
"version": "0.0.1",
"description": "my first socket.io app",
"dependencies": {
"express": "4.3.1",
"socket.io": "1.2.0"
}
}
Thank you for your help