locked
[uwp] uwp中怎么获取设备传过来的udp流数据?有人可以帮帮我吗。 RRS feed

  • 问题

  • 我要在一个uwp应中获取一个设备以udp协议传过来的视频流数据并显示出来,测试了一下在uwp应用与uwp应用间用udp可以正常通信,但是uwp应用中获取不了其它设备发过来的udp数据,我应该要怎样做才是正确的,有人 可以帮助我吗?
    2017年5月8日 2:23

答案

  • @maeoo,

    Datagram​Socket相关的Listen的代码你是怎么写的?我们需要知道你做了什么才能帮助到你。

    另外请确认你阅读了文档的这块:

    "To listen for incoming packets from any remote endpoint (server scenario, for example), call the BindEndpointAsync or BindServiceNameAsync method to bind the DatagramSocket to a local service name or UDP port."

    需要绑定端口或者Service名才能做到监听。


    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.

    • 已标记为答案 maeoo 2017年5月11日 3:04
    2017年5月8日 7:33
    版主

全部回复

  • Hi,

    因为你的问题设计到uwp,我将会把你的帖子移到uwp相关讨论论坛。

    Best Regards,

    Hart


    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.

    2017年5月8日 7:32
  • @maeoo,

    Datagram​Socket相关的Listen的代码你是怎么写的?我们需要知道你做了什么才能帮助到你。

    另外请确认你阅读了文档的这块:

    "To listen for incoming packets from any remote endpoint (server scenario, for example), call the BindEndpointAsync or BindServiceNameAsync method to bind the DatagramSocket to a local service name or UDP port."

    需要绑定端口或者Service名才能做到监听。


    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.

    • 已标记为答案 maeoo 2017年5月11日 3:04
    2017年5月8日 7:33
    版主