C# .net core GetHostAddresses更新为GetHostAddressesAsync

为什么80%的码农都做不了架构师?>>>   hot3.png

GitHub上的说明

代码:

var candidates = new List();
//IPAddress[] nodeIps = Dns.GetHostAddresses(addrOrHost);
//结果与原来保持一致
IPAddress[] nodeIps = Dns.GetHostAddressesAsync(addrOrHost).GetAwaiter().GetResult();

转载于:https://my.oschina.net/idoop/blog/911741

你可能感兴趣的:(C# .net core GetHostAddresses更新为GetHostAddressesAsync)