@@ -452,16 +452,27 @@ impl UnixStream {
452452 /// Set a filter name on the socket to filter incoming connections to defer it before accept(2)
453453 ///
454454 /// an empty name allows to remove this connection's filter
455+ #[ cfg_attr( any( target_os = "freebsd" , target_os = "netbsd" ) , doc = "```no_run" ) ]
456+ #[ cfg_attr( not( any( target_os = "freebsd" , target_os = "netbsd" ) ) , doc = "```ignore" ) ]
457+ /// #![feature(unix_set_mark)]
458+ /// use std::os::unix::net::UnixStream;
459+ ///
460+ /// fn main() -> std::io::Result<()> {
461+ /// let sock = UnixStream::connect("/tmp/sock")?;
462+ /// sock.set_acceptfilter(&c"http")?;
463+ /// Ok(())
464+ /// }
465+ /// ```
455466 #[ cfg( any( doc, target_os = "netbsd" , target_os = "freebsd" ) ) ]
456- #[ unstable( feature = "acceptfilter" , issue = "none " ) ]
467+ #[ unstable( feature = "acceptfilter" , issue = "121891 " ) ]
457468 pub fn set_acceptfilter ( & self , name : & CStr ) -> io:: Result < ( ) > {
458469 self . 0 . set_acceptfilter ( name)
459470 }
460471
461472 /// Get a filter name if one had been set previously on the socket.
462473 ///
463474 #[ cfg( any( doc, target_os = "netbsd" , target_os = "freebsd" ) ) ]
464- #[ unstable( feature = "acceptfilter" , issue = "none " ) ]
475+ #[ unstable( feature = "acceptfilter" , issue = "121891 " ) ]
465476 pub fn acceptfilter ( & self ) -> io:: Result < & CStr > {
466477 self . 0 . acceptfilter ( )
467478 }
0 commit comments