[Mono-dev] Support 2-args Socket ctor added in .NET 4.5

Kornel Pal kornelpal at gmail.com
Sun Oct 26 11:40:55 UTC 2014


Hi,

This is possible on Unix (and Windows) using the IPV6_V6ONLY socket 
option. I'm not sure however about how widely this is adopted.

Kornel

On 10/26/2014 5:01 AM, Miguel de Icaza wrote:
> I am not sure that Unix can support the idiom surfaced by the 
> two-parameter Socket.
>
> If K wants to be cross platform, it likely needs to create two 
> separate sockets, one for each domain, and not assume that you can 
> create a single socket that can be used with multiple domains at once.
>
> Miguel
>
> On Sat, Oct 25, 2014 at 10:38 AM, Kei Nakazawa <muo at muo.jp 
> <mailto:muo at muo.jp>> wrote:
>
>     Hello,
>
>     I noticed some test code of Kestrel (web server for ASP.NET
>     <http://ASP.NET> vNext) fails to compile on Linux hosts.
>
>     /kestrel/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs(325,34):
>     error CS1729: 'Socket' does not contain a constructor that takes 2
>     arguments
>     ref:
>     https://github.com/aspnet/KestrelHttpServer/blob/dev/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs#L325
>
>     It's because 2 args ctor is a new one introduced in .NET 4.5 and
>     not currently exist on Mono. I found a bugzilla entry mentioning
>     this issue: https://bugzilla.xamarin.com/show_bug.cgi?id=20048 and
>     dug Mono code for finding solutions.
>
>     After couple of minutes of investigation, I gave up to write a
>     "clean" dual stack (IPv4/v6) support and wrote a simple proxy ctor:
>     https://github.com/mono/mono/pull/1364/files (Thanks @martinjt for
>     reviewing my pull-req.)
>
>     As I don't see any demands for IPv4/v6 dual stack support around
>     ASP.NET <http://ASP.NET> vNext community, I believe hard-coding
>     protocol version to v4 is just enough and better than nothing at
>     least for now (of course, full support of dual stack would be great).
>
>     Any comments/feedback are welcomed.
>
>     Regards, Kei.
>
>     _______________________________________________
>     Mono-devel-list mailing list
>     Mono-devel-list at lists.ximian.com
>     <mailto:Mono-devel-list at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20141026/d1d54ad9/attachment.html>


More information about the Mono-devel-list mailing list