How to check whether a port is open at client's network/firewall?

前端 未结 8 1442
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 13:13

This is solved at last with \"timeout\" attribute of jQuery AJAX (and JSONP). See my own answer !

Please see the updated part, I

8条回答
  •  感情败类
    2020-11-30 13:36

    You cannot do this in JavaScript because it doesn't have true socket support, with JavaScript you can only test for the presence of HTTP socket. You could use Java (JavaScript is not Java) and write a proper Java Applet to do it.

    You should also read this Q&A How to Ping in java

    Try using isReachable

提交回复
热议问题