Trait trust_dns_proto::udp::UdpSocket [−][src]
Trait for UdpSocket
Associated Types
Loading content...Required methods
#[must_use]fn bind<'async_trait>(
addr: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
addr: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
UdpSocket
fn poll_recv_from(
&self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr)>>
[src]
&self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr)>>
Poll once Receive data from the socket and returns the number of bytes read and the address from where the data came on success.
fn poll_send_to(
&self,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr
) -> Poll<Result<usize>>
[src]
&self,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr
) -> Poll<Result<usize>>
Poll once to send data to the given address.
Provided methods
#[must_use]fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Receive data from the socket and returns the number of bytes read and the address from where the data came on success.
#[must_use]fn send_to<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 [u8],
target: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
buf: &'life1 [u8],
target: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Send data to the given address.
Implementations on Foreign Types
impl UdpSocket for UdpSocket
[src]
type Time = TokioTime
fn bind<'async_trait>(
addr: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
addr: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
fn poll_recv_from(
&self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr)>>
[src]
&self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr)>>
fn poll_send_to(
&self,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr
) -> Poll<Result<usize>>
[src]
&self,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr
) -> Poll<Result<usize>>