[Mono-dev] .NET / Mono runtime multi-cast differences.
alan.mcgovern at gmail.com
Mon Aug 24 03:56:24 EDT 2009
Unless I'm missing something, you haven't actually described what the
problem is. Nor have you mentioned what exactly happens on windows, what
happens on linux and what you actually expected to happen. Your example also
appears to be missing information which might help figure out what issue it
is you're seeing, what are listenChannel and listenEndpoint?
On Mon, Aug 24, 2009 at 3:20 AM, James P Michels III <
james.p.michels at gmail.com> wrote:
> I have observed a difference in behavior between the Mono runtime and
> .NET runtime with respect to multi-cast support.
> Unless the Socket.Bind operation is modified to bind to a different end
> point based on the runtime, no packets will be received. The workaround
> that I am using is shown in the attached code section.
> I took a look at Mono's source code. Additionally, I wrote a short C
> program with the equivalent functionality. The C version for Linux
> exhibits the same behavior. It is my impression that the behavior is due
> to differences between the Windows socket implementation and the Linux
> socket implementation. It is also my impression that these differences
> are being realized by both the .NET and Mono runtime which ultimately
> consume them.
> I have 2 questions.
> 1) Am I wrong? Is there a runtime agnostic way to do this? (Binding to
> IPAddress.Any does not work on Windows to my knowledge)
> 2) If I am not wrong, what steps, if any, should be taken to resolve
> these differences?
> ---------begin code sample------------
> listenSocket = new Socket(AddressFamily.InterNetwork,
> SocketType.Dgram, ProtocolType.Udp);
> SocketOptionName.ReuseAddress, true);
> if (IsMonoRuntime())
> SocketOptionName.MulticastInterface, listenInterface.GetAddressBytes());
> SocketOptionName.AddMembership, new
> MulticastOption(listenChannel.Address, listenInterface));
> ---------end code sample------------
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list