我正在开发一个 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
我该如何解决这个错误?