pub async fn recv_from(&mut self, buf: &mut [u8]) -> io::Result<(usize, ManagerSocketAddr)> {
        match *self {
            ManagerDatagram::UdpDatagram(ref mut udp) => {
                let (s, addr) = udp.recv_from(buf).await?;
                Ok((s, ManagerSocketAddr::SocketAddr(addr)))
            }
            #[cfg(unix)]
            ManagerDatagram::UnixDatagram(ref mut unix) => {
                let (s, addr) = unix.recv_from(buf).await?;
                Ok((s, ManagerSocketAddr::UnixSocketAddr(addr)))
            }
        }
    }
/// Receives data from the socket.
Receives data from the socket.
Receives data from the socket .
pub async fn recv_from(&mut self, buf: &mut [u8]) -> io::Result<(usize, ManagerSocketAddr)> {
        match *self {
            ManagerDatagram::UdpDatagram(ref mut udp) => {
                let (s, addr) = udp.recv_from(buf).await?;
                Ok((s, ManagerSocketAddr::SocketAddr(addr)))
            }
            #[cfg(unix)]
            ManagerDatagram::UnixDatagram(ref mut unix) => {
                let (s, addr) = unix.recv_from(buf).await?;
                Ok((s, ManagerSocketAddr::UnixSocketAddr(addr)))
            }
        }
    }
pub async fn recv_from ( & mut self , buf : & mut [ u8 ] ) -> io :: Result < ( usize , ManagerSocketAddr ) > { match * self { ManagerDatagram :: UdpDatagram ( ref mut udp ) => { let ( s , addr ) = udp . recv_from ( buf ) . await ? ; Ok ( ( s , ManagerSocketAddr :: SocketAddr ( addr ) ) ) } # [ cfg ( unix ) ] ManagerDatagram :: UnixDatagram ( ref mut unix ) => { let ( s , addr ) = unix . recv_from ( buf ) . await ? ; Ok ( ( s , ManagerSocketAddr :: UnixSocketAddr ( addr ) ) ) } } }
Receives data from the socket.
Receives data from the socket .
&mut self
buf
&mut [u8]
&mut self
buf
&mut [u8]