Check port function
How can I check that whi开发者_C百科ch port for which function in java ? Example:
Port xx is for webserver
Port xx is for fpt server
port xx is for mail server. ...
Thanks
Unless you're opening connections to the ports and trying every possible server protocol, you won't be able to check which service is accessible through a given port.
An example: Port 80 ist HTTPd, but the server admin could map port 80 to smtpd, so you have to connect to the port and try http, smtp, ssh, ....
Edit
I would say it's only feasible for some protocols like HTTP and SMTP. If the server side is encrypted, you can't tell which service is answering. There are lots of possible services (check the first comment's link), encrypted services, and other problems awaiting you :)
精彩评论