Trying to understand how works socket.io