pub fn bind_uds<F, U, N>(self, name: N, addr: U, factory: F) -> io::Result<Self>
    where
        F: ServiceFactory<actix_rt::net::UnixStream>,
        N: AsRef<str>,
        U: AsRef<std::path::Path>,
    {
        use std::os::unix::net::UnixListener;

        // The path must not exist when we try to bind.
        // Try to remove it to avoid bind error.
        if let Err(e) = std::fs::remove_file(addr.as_ref()) {
            // NotFound is expected and not an issue. Anything else is.
            if e.kind() != std::io::ErrorKind::NotFound {
                return Err(e);
            }
        }

        let lst = UnixListener::bind(addr)?;
        self.listen_uds(name, lst, factory)
    }
/// Add new unix domain service to the server.
Add new unix domain service to the server.
Add new unix domain service to the server .
pub fn bind_uds<F, U, N>(self, name: N, addr: U, factory: F) -> io::Result<Self>
    where
        F: ServiceFactory<actix_rt::net::UnixStream>,
        N: AsRef<str>,
        U: AsRef<std::path::Path>,
    {
        use std::os::unix::net::UnixListener;
        // The path must not exist when we try to bind.
        // Try to remove it to avoid bind error.
        if let Err(e) = std::fs::remove_file(addr.as_ref()) {
            // NotFound is expected and not an issue. Anything else is.
            if e.kind() != std::io::ErrorKind::NotFound {
                return Err(e);
            }
        }
        let lst = UnixListener::bind(addr)?;
        self.listen_uds(name, lst, factory)
    }
pub fn bind_uds < F , U , N > ( self , name : N , addr : U , factory : F ) -> io :: Result < Self > where F : ServiceFactory < actix_rt :: net :: UnixStream > , N : AsRef < str > , U : AsRef < std :: path :: Path > , { use std :: os :: unix :: net :: UnixListener ; // The path must not exist when we try to bind. // Try to remove it to avoid bind error. if let Err ( e ) = std :: fs :: remove_file ( addr . as_ref ( ) ) { // NotFound is expected and not an issue. Anything else is. if e . kind ( ) != std :: io :: ErrorKind :: NotFound { return Err ( e ) ; } } let lst = UnixListener :: bind ( addr ) ? ; self . listen_uds ( name , lst , factory ) }
Add new unix domain service to the server.
Add new unix domain service to the server .
self
name
N
addr
U
factory
F
self
name
N
addr
U
factory
F