Networking 使用Windows Phone 8 emulator的多播网络应用程序

Networking 使用Windows Phone 8 emulator的多播网络应用程序,networking,windows-phone-8,windows-phone,multicast,Networking,Windows Phone 8,Windows Phone,Multicast,我正在使用多播网络为WindowsPhone8实现一个多人纸牌游戏。 但是,当我尝试链接windows phone和emulator时,什么也没有发生(也没有错误) 我可以使用internet explorer上网冲浪,这样我的模拟器就可以连接到internet 我是否必须在模拟器上执行特殊操作才能使其执行多播操作? 还是代码中缺少了什么 代码如下: 初始化 channel = new UdpChannel(IPAddress.Parse("224.109.108.106"), 3000);

我正在使用多播网络为WindowsPhone8实现一个多人纸牌游戏。 但是,当我尝试链接windows phone和emulator时,什么也没有发生(也没有错误)

我可以使用internet explorer上网冲浪,这样我的模拟器就可以连接到internet

我是否必须在模拟器上执行特殊操作才能使其执行多播操作? 还是代码中缺少了什么

代码如下:

初始化

channel = new UdpChannel(IPAddress.Parse("224.109.108.106"), 3000);

this.channel.OnAfterOpened += new EventHandler<UdpPacketEventArgs>(channel_OnAfterOpen);

this.channel.OnPacketReceived += new EventHandler<UdpPacketEventArgs(Channel_PacketReceived);

this.channel.Open();
我的事件处理程序

private void Channel_PacketReceived(object sender, UdpPacketEventArgs e)
{
    MessageBox.Show("Something Received");
}

private void channel_OnAfterOpen(object sender, UdpPacketEventArgs e)
{
    this.Status.Text = "Connected";
}
有两个很好的样品:你看到了吗?
public class UdpPacketEventArgs : EventArgs
{
    public string Message { get; private set; }
    public string Source { get; private set; }

    public UdpPacketEventArgs(string source, string data)
    {
        this.Message = data;
        this.Source = source;
    }
}
private void Channel_PacketReceived(object sender, UdpPacketEventArgs e)
{
    MessageBox.Show("Something Received");
}

private void channel_OnAfterOpen(object sender, UdpPacketEventArgs e)
{
    this.Status.Text = "Connected";
}