chkr1011 / CoAPnet

CoAPnet is a high performance .NET library for CoAP based communication. It provides a CoAP client and a CoAP server. It also has DTLS support out of the box.
MIT License
70 stars 15 forks source link

what wrong #18

Open Aaron198513 opened 2 months ago

Aaron198513 commented 2 months ago

发生异常: CLR/CoAPnet.Exceptions.CoapCommunicationException “CoAPnet.Exceptions.CoapCommunicationException”类型的异常在 System.Private.CoreLib.dll 中发生,但未在用户代码中进行处理: 'Error while resolving DNS name.' 发现内部异常,有关更多详细信息,请参阅变量窗口中的 $exception。 最里面的异常 System.Net.Sockets.SocketException : 不知道这样的主机。 在 CoAPnet.LowLevelClient.LowLevelCoapClient.d__12.MoveNext() 在 c:\Users\19112\Desktop\github\CoAPnet-master\CoAPnet-master\Source\CoAPnet\LowLevelClient\LowLevelCoapClient.cs 中: 第 118 行

chkr1011 commented 2 months ago

To me it looks like that the DNS name could not be resolved. Maybe the DNS server is not reachable?

Aaron198513 commented 1 week ago

thanks you! but There is another problem here. When I enter the wrong IP and port to call the ConnectAsync method, no exception will be thrown.there is an example.When I enter the ip as 127.0.0.2 the port is 6666.The code will continue to execute