Skip to content

Tracking Issue for tcp_deferaccept #119639

Description

@devnexen

Feature gate: #![feature(tcp_deferaccept)]

This is a tracking issue for the tcp_deferaccept feature.

It allows for the current socket to delay the acceptance of a connection until data is available to be read

Public API

It expands the existing Linux's TcpStreamExt trait with

pub trait TcpStreamExt: Sealed{
  fn deferaccept(&self) -> io::Result<Duration>;
  fn set_deferaccept(&self, accept: Duration) -> io::Result<()>;
}

This feature directly translates to the underlying native Linux TCP_DEFER_ACCEPT tcp(7) option.

Implementation history

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    T-libs-api[DEPRECATED; DO NOT USE]
    on Jan 5, 2024
  2. joshtriplett commented on Apr 29, 2025

    @joshtriplett
    Member

    We talked about this in today's @rust-lang/libs-api meeting.

    Several people felt like this should accept a Duration instead of a u32 number of seconds. That would allow for the future possibility of an interface that allows sub-second granularity, without having to add a new function.

    If we do that, then we should document that we round the Duration down to the nearest second.

  3. added a commit that references this issue on Sep 27, 2025
  4. added 2 commits that reference this issue on Sep 28, 2025
  5. added a commit that references this issue on Sep 28, 2025
  6. added a commit that references this issue on Oct 9, 2025
  7. JohnTitor commented on Jan 28, 2026

    @JohnTitor
    Member

    The above comment is now resolved and I guess no blockers now? Could we start FCP to stabilize this? @rust-lang/libs-api

  8. Amanieu commented on Feb 14, 2026

    @Amanieu
    Member

    @rfcbot merge libs-api

  9. rust-rfcbot commented on Feb 14, 2026

    @rust-rfcbot
    Collaborator

    Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:

    No concerns currently listed.

    Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

    See this document for info about what commands tagged team members can give me.

  10. added
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.
    on Feb 14, 2026
  11. added
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    and removed
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    on Mar 24, 2026
  12. rust-rfcbot commented on Mar 24, 2026

    @rust-rfcbot
    Collaborator

    🔔 This is now entering its final comment period, as per the review above. 🔔

  13. added
    to-announceAnnounce this issue on triage meeting
    and removed
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Apr 3, 2026
  14. rust-rfcbot commented on Apr 3, 2026

    @rust-rfcbot
    Collaborator

    The final comment period, with a disposition to merge, as per the review above, is now complete.

    As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

  15. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 12, 2026
  16. JohnDowson commented on Sep 17, 2026

    @JohnDowson

    I have got to ask. Why is it deferaccept and not defer_accept, when the underlying platform feature is spelt TCP_DEFER_ACCEPT with a word break?

  17. JohnTitor commented on Sep 19, 2026

    @JohnTitor
    Member

    It has been discussed on #154834, and yeah we should rename it.
    Maybe we should do re-FCP once everything has a consensus.

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

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions