If you may have received an error, during WebSocket handshake Unexpected response code 400 on browser,

WebSocket connection to 'ws://' failed: Error during WebSocket handshake: Unexpected response code: 400

 You have to specify the port sockets are going to use. Just had to write:

var ioSocket = io.connect('ws://');

You must use with port 1920. Source.