积极答复者
UWP应用本地开启UDP通信收不到其他应用发来的包,如何解决?

问题
答案
-
从目前情况来看,单一IP地址下无法正常接收数据,那么只要可以实现发送端和接收端处于不同的IP,就可以实现UDP数据的正常收发。
您可以选取任何适合您的解决方案,双网卡也是其中之一。
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 qaz6908768 2019年10月17日 8:30
全部回复
-
您好,
如您所说,数据的发送端和接收端在同一台设备上,当IP地址相同时,UWP应用是收不到UDP发送的信息的。
我建议您使用两台设备分别用作数据的收发,或者如您所做的那样,使用双网卡对IP地址进行更改。
倘若要进行本机进程间通信,并不建议使用UDP进行数据收发。您可以考虑AppService或者数据共享
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
从目前情况来看,单一IP地址下无法正常接收数据,那么只要可以实现发送端和接收端处于不同的IP,就可以实现UDP数据的正常收发。
您可以选取任何适合您的解决方案,双网卡也是其中之一。
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 qaz6908768 2019年10月17日 8:30