问题
I'm trying to execute a simple example of Multicast sockets on Java.
MulticastSocket s = new MulticastSocket(6789);
InetAddress group = InetAddress.getByName("230.1.1.1");
s.joinGroup(group);
This code generates the error: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
Any idea?
回答1:
Some Windows machines can experience this when the DHCP Media Sense feature is enabled (it is by default). To address this you may need to disable HDHCP media sensing as described here: http://support.microsoft.com/kb/239924.
It may also happen if the network interface does not support multicast. VPN interfaces are notorious for this.
Also, try to disable TCP/IP filtering: Local Area Connection Properties > Internet Protocol > Properties > Advanced > Options > Properties > Disable "Enable TCP/IP Filtering".
来源:https://stackoverflow.com/questions/2534551/error-on-multicastsocket-joingroup