MulticastOption in C# sockets

The MulticastOption class sets IP address values when joining or leaving an IP multicast group.

The following examples joins the default IP interface to an IP multicast group. It assumes that groupIP is an IPAddress instance that has been set to the IP multicast group address in the range to

Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp ); 
    new MulticastOption( groupIP ));

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.