Adds a System.Net.Sockets.UdpClient to a multicast group.
- multicastAddr
- The multicast System.Net.IPAddress of the group you want to join.
- localAddress
- The local System.Net.IPAddress.
Before you join a multicast group, be sure that the socket is bound to the port or endpoint. You can do this by calling one of the constructors that accepts a port or an endpoint as parameter.
There are several multicast address ranges to choose from. You can find them in the IETF RFC 2375.
You cannot call erload:System.Net.Sockets.UdpClient.JoinMulticastGroup on a System.Net.Sockets.UdpClient constructed without a specific local port (that is, using the UdpClient.#ctor or UdpClient.#ctor(AddressFamily) constructor).