• c#实现ping


     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();


            }

  • 相关阅读:
    预编译命令 #if DEBUG
    conda常用命令
    tensorflow 安装指南
    LocNET和池化理解
    同时安装cuda8和cuda9
    np.transpose
    python中List的slice用法
    书单
    训练工程
    linux 查看进程
  • 原文地址:https://www.cnblogs.com/kevinlzf/p/682796.html
Copyright © 2020-2023  润新知