Generic events socket.js