I don't think there's a reason to use TCP for this unless you want to check for TCP connectivity specifically.
Just do a DNS lookup against a list of well-known public DNS servers.
Just do a DNS lookup against a list of well-known public DNS servers.