The way this works, you're not really testing that the services actually are functioning. You're just connecting to the port, which is done at the OS level. So your service could've hung, but as far as you're concerned, it's still alive.
Also, most services have a no-op type function that returns some sort of standard string you can test for. With SMTP, you could 'say hello' by sending 'HELO bob', and expect to get a response. I can't remember the other ones.
In reply to Re: Code Review: Checking open ports.
by ozone
in thread Code Review: Checking open ports.
by Chady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |