本文介绍了MulticastSocket.joinGroup()出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Java上执行一个简单的多播套接字示例。

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);

此代码生成错误:IP_ADD_MEMBERSHIP失败(硬件过滤器外?)

This code generates the error: IP_ADD_MEMBERSHIP failed (out of hardware filters?)

有什么想法吗?

推荐答案

某些Windows机器可以在启用DHCP Media Sense功能时遇到此问题(默认情况下)。要解决此问题,您可能需要禁用HDHCP媒体感应,如下所述:。

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.

如果网络接口不支持多播,也可能发生这种情况。 VPN接口因此而臭名昭着。

It may also happen if the network interface does not support multicast. VPN interfaces are notorious for this.

此外,尝试禁用TCP / IP过滤:本地连接属性> Internet协议>属性>高级>选项>属性>禁用启用TCP / IP过滤。

Also, try to disable TCP/IP filtering: Local Area Connection Properties > Internet Protocol > Properties > Advanced > Options > Properties > Disable "Enable TCP/IP Filtering".

这篇关于MulticastSocket.joinGroup()出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 07:32