Reputation: 45911
I'm developing an Android 3.1 Tablet application.
It has a 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;
}
I get an error here:
InetAddress group = InetAddress.getByName("203.0.113.0");
This is the error:
java.io.IOException: Attempted to join a non-multicast group
How can I fix this error?
Upvotes: 1
Views: 1222