Updated socket.js