Being able to check for a TCP based service is generally useful, not only for NETCONF. Therefore, break it out to a separate function that allows any port to be queried.