2013-07-05 61 views

回答

0

平一個DNS幾乎是註冊像4.2.2.4,4.2.2.3,4.2.2.2

Ping myPing = new Ping(); 
String host = "4.2.2.4; 
byte[] buffer = new byte[32]; 
int timeout = 1000; 
PingOptions pingOptions = new PingOptions(); 
PingReply reply = myPing.Send(host, timeout, buffer, pingOptions); 
if (reply.Status == IPStatus.Success { 
    // presumably online 
} 
+0

以上代碼在線和離線都返回true –