socket listen to global events