I want to check if proxy exist/available or not. I’ve ready this post, but I didn’t understood what is the difference by sending Ping to proxy(System.Net.NetworkInformation.Ping) or sending via Socket(System.Net.Sockets.Socket)? Is there any cons or pros? Or does Ping class uses Socket class and thus Ping is just a wrapper?
I want to check if proxy exist/available or not. I’ve ready this post, but
Share
Checking if it is alive with a ping could be not reliable since the firewall on that machine could be configured to not reply to the ping request(for security reasons), while checking directly the servie on the socket you will know for sure if the service is alive or not …
Another pros to check directly the service and avoid the ping is that the server could respond to the ping and be online but the service could be down, so you will get a check result that doesn’t mean anything.
Don’t rely on ping to check the availability of a specific service, check the service instead.