Trait trust_dns_proto::udp::UdpSocket[][src]

pub trait UdpSocket where
    Self: Sized + Unpin
{ fn bind<'life0, 'async_trait>(
        addr: &'life0 SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn recv_from<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buf: &'life1 mut [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn send_to<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        buf: &'life1 [u8],
        target: &'life2 SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

Trait for UdpSocket

Required methods

UdpSocket

Receive data from the socket and returns the number of bytes read and the address from where the data came on success.

Send data to the given address.

Implementations on Foreign Types

Implementors