Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Socket.OSSupportsUnixDomainSockets property #863

Closed
stephentoub opened this issue Mar 2, 2018 · 2 comments · Fixed by #32160
Closed

Consider Socket.OSSupportsUnixDomainSockets property #863

stephentoub opened this issue Mar 2, 2018 · 2 comments · Fixed by #32160
Assignees
Labels
api-approved API was approved in API review, it can be implemented area-System.Net.Sockets
Milestone

Comments

@stephentoub
Copy link
Member

System.Net.Socket currently has these two properties:

public static bool OSSupportsIPv4 { get; }
public static bool OSSupportsIPv6 { get; }

In .NET Core 2.1, we've added a public EndPoint-derived type for Unix domain sockets (UnixDomainSocketEndPoint). Unix domain sockets work across all Unixes we target, but Windows is also adding support (https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/), and we can support that via UnixDomainSocketEndPoint as well. We should consider adding:

public static bool OSSupportsUnixDomainSockets { get; }
@clemensv
Copy link

Just running into that during some Azure Relay work. +1 from here.

@terrajobst
Copy link
Member

terrajobst commented Nov 26, 2019

Video

  • Some version of Windows 10 supports Unix domain sockets; having a capability API to check this without having to know the exact OS version
  • Only concern is that there are more capability APIs we might have to expose in the future. It's debatable whether a Boolean properties on this type are the correct pattern, but it seems consistent with prior art and domain sockets are reasonably common.
namespace System.Net.Sockets
{
    public partial class Socket
    {
        public static bool OSSupportsUnixDomainSockets { get; }
        // Existing APIs
        // public static bool OSSupportsIPv4 { get; }
        // public static bool OSSupportsIPv6 { get; }
    }
}

@maryamariyan maryamariyan transferred this issue from dotnet/corefx Dec 13, 2019
@maryamariyan maryamariyan added api-approved API was approved in API review, it can be implemented area-System.Net.Sockets labels Dec 13, 2019
@maryamariyan maryamariyan added this to the 5.0 milestone Dec 13, 2019
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Dec 13, 2019
@davidsh davidsh removed the untriaged New issue has not been triaged by the area owner label Dec 14, 2019
@davidsh davidsh moved this from Needs triage to Closed in Networking API Review Dec 14, 2019
@stephentoub stephentoub self-assigned this Feb 12, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Net.Sockets
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants