1234567891011121314151617181920212223 |
- using System.Net.NetworkInformation;
- using System.Threading.Tasks;
- namespace Team.Communicate.Helper
- {
- public class BasicClass
- {
- //检查PLC链接状况
- //public static bool PingCheck(string ip, int timeOut)
- //{
- // using Ping ping = new();
- // PingReply pr = ping.Send(ip, timeOut);
- // return pr.Status == IPStatus.Success;
- //}
- //public static async Task<bool> PingCheckAsync(string ip, int timeOut)
- //{
- // using Ping ping = new();
- // PingReply pr = await ping.SendPingAsync(ip, timeOut);
- // return pr.Status == IPStatus.Success;
- //}
- }
- }
|