UdpClient receivingUdpClient = new UdpClient();
没有指定端口 
----------------------IPEndPoint RemoteIpEndPoint ;
RemoteIpEndPoint=null ;Byte[] receiveBytes = receivingUdpClient.Receive(ref RemoteIpEndPoint); 

解决方案 »

  1.   

    你忘记了最重要的一句:
    UdpClient.JoinMulticastGroup(GroupAddress);
    private static readonly IPAddress GroupAddress = IPAddress.Parse("224.168.100.2");
    private const int GroupPort = 11000;
    listener.JoinMulticastGroup(GroupAddress);
    listener.Connect(groupEP);
    ...
    while (!done)
    {
        Console.WriteLine("Waiting for broadcast");
        byte[] bytes = listener.Receive( ref groupEP);    Console.WriteLine("Received broadcast from {0} :\n {1}\n",
                groupEP.ToString(),
                Encoding.ASCII.GetString(bytes,0,bytes.Length));
    }