pub fn bind<A: AsRef<Path>>(addr: A) -> Result<UnixListener> {
        let sk = Socket::new(Domain::unix(), Type::stream(), None)?;
        let addr = socket2::SockAddr::unix(addr.as_ref())?;

        sk.bind(&addr)?;
        sk.listen(128)?;
        let listener = sk.into_unix_listener();

        Ok(UnixListener {
            reactor: Rc::downgrade(&crate::executor().reactor()),
            listener,
        })
    }
/// Creates a Unix listener bound to the specified address.
///
/// Binding with port number 0 will request an available port from the OS.
///
/// This method sets the ReusePort option in the bound socket, so it is
/// designed to be called from multiple executors to achieve
/// parallelism.
///
/// # Examples
///
/// ```no_run
/// use glommio::{net::UnixListener, LocalExecutor};
///
/// let ex = LocalExecutor::default();
/// ex.run(async move {
///     let _listener = UnixListener::bind("/tmp/named").unwrap();
/// });
/// ```
Creates a Unix listener bound to the specified address.
Binding with port number 0 will request an available port from the OS.

This method sets the ReusePort option in the bound socket, so it is
designed to be called from multiple executors to achieve
parallelism.
Creates a Unix listener bound to the specified address . Binding with port number 0 will request an available port from the OS . This method sets the ReusePort option in the bound socket so it is designed to be called from multiple executors to achieve parallelism .
pub fn bind<A: AsRef<Path>>(addr: A) -> Result<UnixListener> {
        let sk = Socket::new(Domain::unix(), Type::stream(), None)?;
        let addr = socket2::SockAddr::unix(addr.as_ref())?;
        sk.bind(&addr)?;
        sk.listen(128)?;
        let listener = sk.into_unix_listener();
        Ok(UnixListener {
            reactor: Rc::downgrade(&crate::executor().reactor()),
            listener,
        })
    }
pub fn bind < A : AsRef < Path > > ( addr : A ) -> Result < UnixListener > { let sk = Socket :: new ( Domain :: unix ( ) , Type :: stream ( ) , None ) ? ; let addr = socket2 :: SockAddr :: unix ( addr . as_ref ( ) ) ? ; sk . bind ( & addr ) ? ; sk . listen ( 128 ) ? ; let listener = sk . into_unix_listener ( ) ; Ok ( UnixListener { reactor : Rc :: downgrade ( & crate :: executor ( ) . reactor ( ) ) , listener , } ) }
Creates a Unix listener bound to the specified address.
Creates a Unix listener bound to the specified address .
addr
A
addr
A
examples
```no_run
use glommio::{net::UnixListener, LocalExecutor}.

let ex = LocalExecutor::default();
ex.run(async move {
let _listener = UnixListener::bind("/tmp/named").unwrap();
});
```
` ` ` no_run use glommio :: { net :: UnixListener LocalExecutor } . let ex = LocalExecutor :: default () ; ex . run ( async move { let _listener = UnixListener :: bind ( " / tmp / named " ) . unwrap () ; } ) ; ` ` `