modify check_listening_port to support Solaris
Merge pull request #17 from ftnk/udp-support-for-solaris

modify check_listening_port to support Solaris