Tracking Issue for feature(unix_socket_peek)
rijenkii opened this issue · 6 comments
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
- #73761 - initial implementation
- Final Commitment Period (FCP)
- Stabilization
Unresolved Questions
- None yet.
Any idea when this might get stabilized?
Any news?
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.
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.
@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
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.