pub async fn connect<A: AsRef<Path>>(&self, addr: A) -> Result<()> {
        let addr = SockAddr::new_unix(addr.as_ref())
            .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;

        let reactor = self.socket.reactor.upgrade().unwrap();
        let source = reactor.connect(self.socket.as_raw_fd(), addr);
        source.collect_rw().await.map(|_| {}).map_err(Into::into)
    }
/// Connects an unbounded Unix Datagram socket to a remote address, allowing
/// the [`send`] and [`recv`] methods to be used to send data and also
/// applies filters to only receive data from the specified address.
///
/// If `addr` yields multiple addresses, connect will be attempted with each
/// of the addresses until the underlying OS function returns no error.
/// Note that usually, a successful connect call does not specify that
/// there is a remote server listening on the port, rather, such an
/// error would only be detected after the first send. If the OS returns an
/// error for each of the specified addresses, the error returned from
/// the last connection attempt (the last address) is returned.
///
/// # Examples
///
/// ```no_run
/// use glommio::{net::UnixDatagram, LocalExecutor};
///
/// let ex = LocalExecutor::default();
/// ex.run(async move {
///     let receiver = UnixDatagram::bind("/tmp/dgram").unwrap();
///     let sender = UnixDatagram::unbound().unwrap();
///     sender.connect("/tmp/dgram").await.unwrap();
/// });
/// ```
///
/// [`send`]: UnixDatagram::send
/// [`recv`]: UnixDatagram::recv
Connects an unbounded Unix Datagram socket to a remote address, allowing
the [`send`] and [`recv`] methods to be used to send data and also
applies filters to only receive data from the specified address.

If `addr` yields multiple addresses, connect will be attempted with each
of the addresses until the underlying OS function returns no error.
Note that usually, a successful connect call does not specify that
there is a remote server listening on the port, rather, such an
error would only be detected after the first send. If the OS returns an
error for each of the specified addresses, the error returned from
the last connection attempt (the last address) is returned.
Connects an unbounded Unix Datagram socket to a remote address allowing the [ ` send ` ] and [ ` recv ` ] methods to be used to send data and also applies filters to only receive data from the specified address . If ` addr ` yields multiple addresses connect will be attempted with each of the addresses until the underlying OS function returns no error . Note that usually a successful connect call does not specify that there is a remote server listening on the port rather such an error would only be detected after the first send . If the OS returns an error for each of the specified addresses the error returned from the last connection attempt ( the last address ) is returned .
pub async fn connect<A: AsRef<Path>>(&self, addr: A) -> Result<()> {
        let addr = SockAddr::new_unix(addr.as_ref())
            .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
        let reactor = self.socket.reactor.upgrade().unwrap();
        let source = reactor.connect(self.socket.as_raw_fd(), addr);
        source.collect_rw().await.map(|_| {}).map_err(Into::into)
    }
pub async fn connect < A : AsRef < Path > > ( & self , addr : A ) -> Result < ( ) > { let addr = SockAddr :: new_unix ( addr . as_ref ( ) ) . map_err ( | e | io :: Error :: new ( io :: ErrorKind :: Other , e ) ) ? ; let reactor = self . socket . reactor . upgrade ( ) . unwrap ( ) ; let source = reactor . connect ( self . socket . as_raw_fd ( ) , addr ) ; source . collect_rw ( ) . await . map ( | _ | { } ) . map_err ( Into :: into ) }
Connects an unbounded Unix Datagram socket to a remote address, allowing
the [`send`] and [`recv`] methods to be used to send data and also
applies filters to only receive data from the specified address.
Connects an unbounded Unix Datagram socket to a remote address allowing the [ ` send ` ] and [ ` recv ` ] methods to be used to send data and also applies filters to only receive data from the specified address .
&self
addr
A
&self
addr
A
examples
```no_run
use glommio::{net::UnixDatagram, LocalExecutor}.

let ex = LocalExecutor::default();
ex.run(async move {
let receiver = UnixDatagram::bind("/tmp/dgram").unwrap();
let sender = UnixDatagram::unbound().unwrap();
sender.connect("/tmp/dgram").await.unwrap();
});
```

[`send`]: UnixDatagram::send
[`recv`]: UnixDatagram::recv
` ` ` no_run use glommio :: { net :: UnixDatagram LocalExecutor } . let ex = LocalExecutor :: default () ; ex . run ( async move { let receiver = UnixDatagram :: bind ( " / tmp / dgram " ) . unwrap () ; let sender = UnixDatagram :: unbound () . unwrap () ; sender . connect ( " / tmp / dgram " ) . await . unwrap () ; } ) ; ` ` ` [ ` send ` ] : UnixDatagram :: send [ ` recv ` ] : UnixDatagram :: recv