无法通过无线网络连接在WinRT平板电脑上接收多播UDP [英] Can't receive Multicast UDP on WinRT tablets over a wireless network connection

查看:108
本文介绍了无法通过无线网络连接在WinRT平板电脑上接收多播UDP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将标题更改为多播UDP(非USB)。

Changed the title to be Multicast UDP (not USB).

我正在尝试实施MDNS库来发现联网设备并遇到问题。  我的图书馆可以通过有线和无线网络在英特尔产品上运行良好,并且它可以通过ARM设备(原始NVidia平板电脑之一)的有线网络连接超过
。  它不会通过ARM平板电脑(NVidia和Surface)检测无线网络上的任何多播流量。

I am trying to implement a MDNS library to discover networked devices and am having a problem.  My library works well from Intel products over both wired and wireless networks and it works from an ARM device (one of the original NVidia tablets) over a wired network connection.  It does not detect any of the multicast traffic over a wireless network from an ARM tablet (both an NVidia and a Surface).

我的代码如下所示:


private async void InitializeSocket()
{
    try
    {
        _socket = new DatagramSocket();
        _socket.MessageReceived += HandleMessageReceived;

        await _socket.BindServiceNameAsync("5353");
        _socket.JoinMulticastGroup(_multicastAddress);
        _multicastGroupJoined = true;
        _multicastJoinTask = null;
    }
    catch (Exception e)
    {
        Debug.WriteLine("MDNSIOChannel.InitializeSocket: Exception: ", e.Message);
        Debug.WriteLine(e.StackTrace);
        RetryJoinMulticast();
    }
}

private void HandleMessageReceived(DatagramSocket aSocket,
                                   DatagramSocketMessageReceivedEventArgs anArgs)
{
    if (_disposed || (null == MessageReceived) || (null == anArgs.RemoteAddress))
    {
        return;
    }

    try
    {
        MessageReceived(this, new DatagramEventArgs(anArgs));
    }
    catch (Exception e)
    {
        Debug.WriteLine("MDNSIOChannel.HandleMessageReceived: Exception: " + e.Message);
        Debug.WriteLine(e.StackTrace);
        throw;
    }
}

推荐答案

我遇到了完全相同的问题。  多播UDP可以将数据包发送到ARM(Surface)上的多播组,但是,它不会从多播组接收任何数据包。  然而这在x86和x64上完全正常。  其他私人
网络访问工作非常正常。

I am having the exact same problem.  Multicast UDP sends packets fine to the multicast group on ARM (Surface), however, it does not receive any packets from the multicast group.  Whereas this works absolutely fine on x86 and x64.  Other private network access works absolutely fine.

使用与上述片段类似的代码,我们做错了什么?

Using similar code to the fragment above, so are we doing something wrong?

Larry:主题应该是多播UDP而不是多播USB!

Larry: subject should be Multicast UDP not Multicast USB!


这篇关于无法通过无线网络连接在WinRT平板电脑上接收多播UDP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆