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

Tracking Issue for feature(unix_socket_peek) #76923

Open
1 of 3 tasks
rijenkii opened this issue Sep 19, 2020 · 6 comments
Open
1 of 3 tasks

Tracking Issue for feature(unix_socket_peek) #76923

rijenkii opened this issue Sep 19, 2020 · 6 comments
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC Libs-Tracked Libs issues that are tracked on the team's project board. O-unix Operating system: Unix-like T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@rijenkii
Copy link
Contributor

rijenkii commented Sep 19, 2020

This is a tracking issue for methods peek and peek_from on UnixStream and UnixDatagram (#73761).
The feature gate for the issue is #![feature(unix_socket_peek)].

Public API

impl UnixStream {
    pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize>
}

impl UnixDatagram {
    pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize>
    pub fn peek_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)>
}

Steps / History

Unresolved Questions

  • None yet.
@rijenkii rijenkii added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Sep 19, 2020
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Sep 19, 2020
@KodrAus KodrAus added the Libs-Tracked Libs issues that are tracked on the team's project board. label Nov 6, 2020
@KodrAus KodrAus added A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` O-unix Operating system: Unix-like labels Jan 6, 2021
@daniel5151
Copy link

Any idea when this might get stabilized?

@LinkTed
Copy link
Contributor

LinkTed commented Aug 3, 2021

Any news?

@rijenkii
Copy link
Contributor Author

rijenkii commented Jan 1, 2023

Sadly I have not been using Rust for the last year or so, and have not used this feature for even longer.

In more than two years that this feature has existed in unstable, no bugs have been reported.
Documentation is done, tests are done, I am not sure what else is needed for stabilization but it seems that it's all good.

@rust-lang/libs-api, asking for FCP.

@jmillikin
Copy link
Contributor

FYI, I wrote a draft RFC for a v2 of Unix socket ancillary data support at rust-lang/rfcs#3430. One of the features it would expose from the underlying recv() / recvmsg() syscall is the MSG_PEEK flag, which has some overlap with the unix_socket_peek feature. It may be of interest to folks subscribed to this tracking issue.

@philipuvarov
Copy link

@KodrAus hey there! It looks like you were the initial reviewer for this functionality :) (sorry for ping!) What is the process for getting this out of nightly? Seems like it's been there for 3 years

@kornelski
Copy link
Contributor

kornelski commented Mar 29, 2024

The v2 RFC (rust-lang/rfcs#3430) proposes adding a peek option in RecvOptions for recv_message() extension trait that also requires use of IoSliceMut and AncillaryData, or wrapping in and configuring a MessageReceiver helper.

I don't think these two APIs are in conflict. The advanced API is quite complex and peeking with it is a multi-step process. Even with the advanced API available, users could prefer .peek() for its simplicity and brevity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC Libs-Tracked Libs issues that are tracked on the team's project board. O-unix Operating system: Unix-like T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

8 participants