J
jlamanna
Hi.
I'm adding IPV6 support to my app, and I have a UDP Broadcast socket
that I need to redo using IPV6.
I know that IPV6 doesn't have a notion of broadcast anymore, its all
multicast (broadcast translates to a multicast address of ff02::1
essentially).
However, the following code throws an exception on the
SetSocketOption() call:
Socket s1 = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram,
ProtocolType.Udp);
s1.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.Broadcast, 1);
s1.Bind(new IPEndPoint(IPAddress.IPv6Any, 60000));
s1.SetSocketOption(SocketOptionLevel.IPv6,
SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Parse("ff02::1")));
Any ideas?
Thanks.
I'm adding IPV6 support to my app, and I have a UDP Broadcast socket
that I need to redo using IPV6.
I know that IPV6 doesn't have a notion of broadcast anymore, its all
multicast (broadcast translates to a multicast address of ff02::1
essentially).
However, the following code throws an exception on the
SetSocketOption() call:
Socket s1 = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram,
ProtocolType.Udp);
s1.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.Broadcast, 1);
s1.Bind(new IPEndPoint(IPAddress.IPv6Any, 60000));
s1.SetSocketOption(SocketOptionLevel.IPv6,
SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Parse("ff02::1")));
Any ideas?
Thanks.