Ping tester for both TCP and UDP