[−][src]Trait async_coap::datagram::AsyncSendTo
Trait for providing sent_to
functionality for asynchronous, datagram-based sockets.
Required methods
fn poll_send_to<B>(
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
A non-blocking1, poll_*
version of std::net::UdpSocket::send_to
.
Note that while the spirit of this method intends for it to be non-blocking,
AllowStdUdpSocket
can block execution depending on the implementation details of the underlyingstd::net::UdpSocket
. ↩
Provided methods
ⓘImportant traits for NextSendToFuture<'a, 'b, T>fn next_send_to<'a, 'b, B>(
&'a self,
buf: &'b [u8],
addr: B
) -> NextSendToFuture<'a, 'b, Self> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
ⓘImportant traits for NextSendToFuture<'a, 'b, T>
&'a self,
buf: &'b [u8],
addr: B
) -> NextSendToFuture<'a, 'b, Self> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
Returns a future that uses AsyncSendTo::poll_send_to
.
fn send_to<B>(&self, buf: &[u8], addr: B) -> Result<usize, Self::Error> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
A synchronous version of AsyncSendTo::poll_send_to
. If this isn't overridden by the
trait's implementation, the default version will call poll_send_to()
and panics if it
returns Poll::Pending
.
Implementors
impl AsyncSendTo for AllowStdUdpSocket
[src]
fn poll_send_to<B>(
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
fn send_to<B>(&self, buf: &[u8], addr: B) -> Result<usize, Self::Error> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
impl AsyncSendTo for LoopbackSocket
[src]
fn poll_send_to<B>(
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
impl AsyncSendTo for NullSocket
[src]
fn poll_send_to<B>(
self: Pin<&Self>,
_cx: &mut Context,
buf: &[u8],
_addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
self: Pin<&Self>,
_cx: &mut Context,
buf: &[u8],
_addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,