Trait UdpSocket

Source
pub trait UdpSocket {
    // Required methods
    fn poll_recv_from(
        &mut self,
        cx: &mut Context<'_>,
        buf: &mut [u8],
    ) -> Poll<Result<(usize, SocketAddr), Error>>;
    fn poll_send_to(
        &mut self,
        cx: &mut Context<'_>,
        buf: &[u8],
        addr: SocketAddr,
    ) -> Poll<Result<usize, Error>>;
}

Required Methods§

Source

fn poll_recv_from( &mut self, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<(usize, SocketAddr), Error>>

Source

fn poll_send_to( &mut self, cx: &mut Context<'_>, buf: &[u8], addr: SocketAddr, ) -> Poll<Result<usize, Error>>

Implementors§