#![feature(unix_socket_ancillary_data)] use std::os::unix::net::{SocketAncillary, UnixDatagram}; fn main() { let sock = UnixDatagram::unbound().expect("failed to create socket"); sock.connect("/tmp/newton.sock").expect("failed to connect"); let mut ancillary_buffer = [0; 128]; let mut ancillary = SocketAncillary::new(&mut ancillary_buffer); ancillary.add_fds(&[1]); sock.send_vectored_with_ancillary(&mut [], &mut ancillary).expect("failed to send"); println!("hi"); loop {} }