Skip to content

Commit a2aaa1a

Browse files
committed
update from tracking issue
1 parent 754cf92 commit a2aaa1a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

library/std/src/os/unix/net/stream.rs

+13-2
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,27 @@ impl UnixStream {
454454
/// Set a filter name on the socket to filter incoming connections to defer it before accept(2)
455455
///
456456
/// an empty name allows to remove this connection's filter
457+
#[cfg_attr(any(target_os = "freebsd", target_os = "netbsd"), doc = "```no_run")]
458+
#[cfg_attr(not(any(target_os = "freebsd", target_os = "netbsd")), doc = "```ignore")]
459+
/// #![feature(unix_set_mark)]
460+
/// use std::os::unix::net::UnixStream;
461+
///
462+
/// fn main() -> std::io::Result<()> {
463+
/// let sock = UnixStream::connect("/tmp/sock")?;
464+
/// sock.set_acceptfilter(&c"http")?;
465+
/// Ok(())
466+
/// }
467+
/// ```
457468
#[cfg(any(doc, target_os = "netbsd", target_os = "freebsd"))]
458-
#[unstable(feature = "acceptfilter", issue = "none")]
469+
#[unstable(feature = "acceptfilter", issue = "121891")]
459470
pub fn set_acceptfilter(&self, name: &CStr) -> io::Result<()> {
460471
self.0.set_acceptfilter(name)
461472
}
462473

463474
/// Get a filter name if one had been set previously on the socket.
464475
///
465476
#[cfg(any(doc, target_os = "netbsd", target_os = "freebsd"))]
466-
#[unstable(feature = "acceptfilter", issue = "none")]
477+
#[unstable(feature = "acceptfilter", issue = "121891")]
467478
pub fn acceptfilter(&self) -> io::Result<&CStr> {
468479
self.0.acceptfilter()
469480
}

0 commit comments

Comments
 (0)