Skip to content

Obsolete Socket.UseOnlyOverlappedIO #47163

Closed

Description

@antonfirsov

Background and Motivation

This property it is only meaningful on .NET Framework where it functions as a socket-level switch between IOCP and Win32 event based overlapped IO.

.NET (Core) Windows sockets are entirely IOCP-based, and the concept of "overlapped IO" does not exist on other platforms, therefore the property contains empty logic, and there is no chance we will ever implement it. To avoid confusion, I suggest to obsolete and hide it it together with the related flag in SocketInformationOptions.

Proposed API

public class Socket
{
+   [Obsolete]
+   [EditorBrowsable(EditorBrowsableState.Never)]
    public bool UseOnlyOverlappedIO { get; set; }
}

public enum SocketInformationOptions
{
    NonBlocking = 1,
    Connected = 2,
    Listening = 4,
+   [Obsolete]
+   [EditorBrowsable(EditorBrowsableState.Never)]
    UseOnlyOverlappedIO = 8,
}

Risks

Breaking /warnaserror builds when porting to .NET 6. (Which may actually prevent runtime failures.)

Activity

  1. added
    api-suggestionEarly API idea and discussion, it is NOT ready for implementation
    on Jan 19, 2021
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 19, 2021
  3. Wraith2 commented on Jan 19, 2021

    @Wraith2
    Contributor

    Is it also worth marking it as non browsable?

  4. antonfirsov commented on Jan 19, 2021

    @antonfirsov
    ContributorAuthor

    Is it also worth marking it as non browsable?

    In my opinion - yes, so updated the proposal.

  5. added
    api-ready-for-reviewAPI is ready for review, it is NOT ready for implementation
    and removed
    api-suggestionEarly API idea and discussion, it is NOT ready for implementation
    untriagedNew issue has not been triaged by the area owner
    on Feb 4, 2021
  6. added this to the 6.0.0 milestone on Feb 4, 2021
  7. karelz commented on Feb 4, 2021

    @karelz
    Member

    Triage: We agree, it is no-op on .NET Core, let's obsolete it.

  8. added
    api-approvedAPI was approved in API review, it can be implemented
    and removed
    api-ready-for-reviewAPI is ready for review, it is NOT ready for implementation
    on Feb 4, 2021
  9. terrajobst commented on Feb 4, 2021

    @terrajobst
    Contributor

    Video

    • Looks good
    • It feels over-engineered to add a diagnostic ID to this obsoletion
    namespace System.Net.Sockets
    {
        public partial class Socket
        {
            [Obsolete]
            [EditorBrowsable(EditorBrowsableState.Never)]
            public bool UseOnlyOverlappedIO { get; set; }
        }
        public partial enum SocketInformationOptions
        {
            [Obsolete]
            [EditorBrowsable(EditorBrowsableState.Never)]
            UseOnlyOverlappedIO = 8,
        }
    }
  10. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on May 7, 2021
  11. added a commit that references this issue on May 18, 2021
    7be77b8
  12. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on May 18, 2021
  13. ghost locked as resolved and limited conversation to collaborators on Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions