set up socket listening for ping