pub fn new(addr: &[u8], recv_timeout: Option<i64>) -> Result<Self> {
        let fd = socket(
            AddressFamily::Unix,
            SockType::Datagram,
            SockFlag::empty(),
            None,
        )
        .c(d!())?;

        setsockopt(fd, sockopt::ReuseAddr, &true).c(d!())?;
        setsockopt(fd, sockopt::ReusePort, &true).c(d!())?;
        if let Some(to) = recv_timeout {
            setsockopt(
                fd,
                sockopt::ReceiveTimeout,
                &TimeVal::milliseconds(to),
            )
            .c(d!())?;
        }

        let sa = SockAddr::Unix(UnixAddr::new_abstract(addr).c(d!())?);
        bind(fd, &sa).c(d!())?;

        Ok(UauSock { fd, sa })
    }
/// NOTE:
///
/// The Unix Socket that needs to receive messages must be bound to an explicit address;
/// If you send msg anonymously, you will not receive the reply msg from the peer.
///
/// So the `addr` parameter should not be empty.
The Unix Socket that needs to receive messages must be bound to an explicit address;
If you send msg anonymously, you will not receive the reply msg from the peer.

So the `addr` parameter should not be empty.
The Unix Socket that needs to receive messages must be bound to an explicit address ; If you send msg anonymously you will not receive the reply msg from the peer . So the ` addr ` parameter should not be empty .
pub fn new(addr: &[u8], recv_timeout: Option<i64>) -> Result<Self> {
        let fd = socket(
            AddressFamily::Unix,
            SockType::Datagram,
            SockFlag::empty(),
            None,
        )
        .c(d!())?;
        setsockopt(fd, sockopt::ReuseAddr, &true).c(d!())?;
        setsockopt(fd, sockopt::ReusePort, &true).c(d!())?;
        if let Some(to) = recv_timeout {
            setsockopt(
                fd,
                sockopt::ReceiveTimeout,
                &TimeVal::milliseconds(to),
            )
            .c(d!())?;
        }
        let sa = SockAddr::Unix(UnixAddr::new_abstract(addr).c(d!())?);
        bind(fd, &sa).c(d!())?;
        Ok(UauSock { fd, sa })
    }
pub fn new ( addr : & [ u8 ] , recv_timeout : Option < i64 > ) -> Result < Self > { let fd = socket ( AddressFamily :: Unix , SockType :: Datagram , SockFlag :: empty ( ) , None , ) . c ( d ! ( ) ) ? ; setsockopt ( fd , sockopt :: ReuseAddr , & true ) . c ( d ! ( ) ) ? ; setsockopt ( fd , sockopt :: ReusePort , & true ) . c ( d ! ( ) ) ? ; if let Some ( to ) = recv_timeout { setsockopt ( fd , sockopt :: ReceiveTimeout , & TimeVal :: milliseconds ( to ) , ) . c ( d ! ( ) ) ? ; } let sa = SockAddr :: Unix ( UnixAddr :: new_abstract ( addr ) . c ( d ! ( ) ) ? ) ; bind ( fd , & sa ) . c ( d ! ( ) ) ? ; Ok ( UauSock { fd , sa } ) }
NOTE:
The Unix Socket that needs to receive messages must be bound to an explicit address;
If you send msg anonymously, you will not receive the reply msg from the peer.
NOTE : The Unix Socket that needs to receive messages must be bound to an explicit address ; If you send msg anonymously you will not receive the reply msg from the peer .
addr
&[u8]
recv_timeout
Option<i64>
addr
&[u8]
recv_timeout
Option<i64>