在.Net中实现ping的命令
System.Net.NetworkInformation.Ping p = new System.Net.NetworkInformation.Ping(); PingOptions options = new PingOptions(); options.DontFragment = true; string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; byte[] buffer = Encoding.ASCII.GetBytes(data); int timeout = 500; PingReply reply = p.Send("62.150.35.230", timeout, buffer, options); Response.Write(reply.Status.ToString());//返回状态
发布于 posted on 2006年12月7日 9:24   由 祥子
:: 

Powered by Community Server Powered by CnForums.Net