libs-team icon indicating copy to clipboard operation
libs-team copied to clipboard

Implementing UnixSocketExt traits for solaris/illumos ; starting with the unix_socket_exclbind feature

Open devnexen opened this issue 10 months ago • 0 comments

Proposal

Problem statement

Goal is to add the possibility, for the aforementioned systems, to be able to control how the incoming connections can bind to a given socket, discarding the SO_REUSEADDR setting.

Motivating examples or use cases

#![feature(unix_socket_exclbind)]
   use std::os::solaris::net::UnixSocketExt;
    use std::os::unix::net::UnixDatagram;
    
    fn main() -> std::io::Result<()> {
        let sock = UnixDatagram::unbound()?;
        sock.set_exclbind(true).unwrap();
        Ok(())
    }

Links and related work

https://github.com/rust-lang/rust/pull/123476

devnexen avatar Apr 05 '24 17:04 devnexen