Http instead of Ws protocol
According to the docs: http://socket.io/docs/
You set the protocol to http e.g. var socket = io('http://localhost');
But should it not be ws e.g. var socket = io('ws://localhost');
as far as i know. you should be able to use 'ws' if you want. The only reason I can think is that 'ws' is not supported in all browser. But the major browser like chrome, firefox, opera, safari has support for it.
As far as I know, socket.io has fallbacks for cases where sockets are not supported out of the box. Hence, we use http:// instead of ws:// On 21 Jul 2015 23:11, "Sasankh" [email protected] wrote:
as far as i know. you should be able to use 'ws' if you want. The only reason I can think is that 'ws' is not supported in all browser. But the major browser like chrome, firefox, opera, safari has support for it.
— Reply to this email directly or view it on GitHub https://github.com/Automattic/socket.io/issues/2180#issuecomment-123412280 .