I have to detect if a server is on or off, some people told me to try using the pinging way, and if it’s not working I should use TCP connection between me and the server.
Can someone please explain me whats the difference between these, why does the ping way may not work good?
Thank you.
I have to detect if a server is on or off, some people told
Share
Using TCP would allow you to verify a certain port/service is operating correctly on a host. While ping would just assure that the machine is responding.
A ping also might be blocked by various firewall settings.
It really will depend on your requirements on what your definition of “up” is for your project.
Just responding, or my service hosted on port X is responding when I open communication.