I'm trying to join a multicast group after creating a MulticastSocket.
Doing something like:
MulticastSocket mySocket = new MulticastSocket(4444);
mySocket.joinGroup(InetAddress.getByName("230.0.0.1")); // as an example
works fine. When I use the MulticastSocket constructor that accepts a SocketAddress as a parameter, though, the multicast group is not joined and a separate call on joinGroup() is required.
MulticastSocket mySocket = new MulticastSocket(new InetSocketAddress("230.0.0.1", 4444));
Why is this?
Thanks!