解决方案 »

  1.   

    按原理这个方法和ping应该同等效果~ 会不会是 不是同一块网卡?
    你这么试试:isReachable(3000)
      

  2.   

    1. isReacheable你用的哪个参数啊?TTL是什么?
    2. 网络的ICMP开了么?
      

  3.   

    Test whether that address is reachable. Best effort is made by the implementation to try to reach the host, but firewalls and server configuration may block requests resulting in a unreachable status while some specific ports may be accessible. A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtainedotherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host.红字部分的意思是,如果本机的权限允许,那么isReachable采用跟PING一样的方式取连接远程服务器。
    但是默认情况下,你绝逼没有这个权限。蓝字部分的意思是,要是没有权限,那么尝试TCP连接远程服务器的7号端口。所以,如果你能够telnet ip 7成功的话,isReachable返回就是true了。
      

  4.   


    isReachable(65535); TTL是注册表上面的值把 没动过 
    看楼下的我知道了 ICMP没权限  端口7不一定能连上
      

  5.   

    感谢   isReachable()的原理总算清楚了  就是没权限  然后7不一定通  就一直false    多谢多谢