UDPClient Multicast receive fails on computer with multiple NICs
问题 I've got a computer with multiple NICs - and UDPClient's send method continually fails. Here's the code: private static void receiveData() { recvSock = new UdpClient(PORT); //recvSock.Client.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, mainInterface); recvSock.JoinMulticastGroup(IPAddress.Parse(IP), 50); IPEndPoint iep = new IPEndPoint(IPAddress.Any, 0); while (true) { byte[] data = recvSock.Receive(ref iep); // Do not include messages from us if (myIPs.Contains