public static string PingResult(string ip)
        {
            System.Net.NetworkInformation.Ping p = new System.Net.NetworkInformation.Ping();
            System.Net.NetworkInformation.PingOptions options = new System.Net.NetworkInformation.PingOptions();
            options.DontFragment = true;
            string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
            byte[] buffer = Encoding.ASCII.GetBytes(data);
            //Wait  seconds for a reply.
             int timeout = 1000

            System.Net.NetworkInformation.PingReply reply = p.Send(ip, timeout, buffer, options);
            return reply.Status.ToString();


        }

相关文章:

  • 2021-05-30
  • 2022-01-29
  • 2021-07-21
  • 2022-01-31
  • 2021-07-17
  • 2021-10-29
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案