我正在开发Android 3.1平板电脑应用程序。
它有一个 MulticastSocket :
public MulticastClient(String serverName, int port, Handler serviceHandler) throws IOException
{
super(serverName);
socket = new MulticastSocket(8888);
InetAddress group = InetAddress.getByName("203.0.113.0");
socket.joinGroup(group);
this.mServiceHandler = serviceHandler;
}
我在这里收到错误:
InetAddress group = InetAddress.getByName("203.0.113.0");
这是错误:
java.io.IOException: Attempted to join a non-multicast group
如何解决此错误?