pub trait IcmpSocket<I>: Unpinwhere
I: IpExt,{
// Required methods
fn async_recv_from(
&self,
buf: &mut [u8],
cx: &mut Context<'_>,
) -> Poll<Result<(usize, I::SockAddr)>>;
fn async_send_to_vectored(
&self,
bufs: &[IoSlice<'_>],
addr: &I::SockAddr,
cx: &mut Context<'_>,
) -> Poll<Result<usize>>;
fn bind_device(&self, interface: Option<&[u8]>) -> Result<()>;
}
Expand description
Async ICMP socket.
Required Methods§
Sourcefn async_recv_from(
&self,
buf: &mut [u8],
cx: &mut Context<'_>,
) -> Poll<Result<(usize, I::SockAddr)>>
fn async_recv_from( &self, buf: &mut [u8], cx: &mut Context<'_>, ) -> Poll<Result<(usize, I::SockAddr)>>
Async method for receiving an ICMP packet.
Upon successful return, buf
will contain an ICMP packet.
Implementations on Foreign Types§
Source§impl<I> IcmpSocket<I> for DatagramSocketwhere
I: IpExt,
impl<I> IcmpSocket<I> for DatagramSocketwhere
I: IpExt,
Source§fn async_recv_from(
&self,
buf: &mut [u8],
cx: &mut Context<'_>,
) -> Poll<Result<(usize, I::SockAddr)>>
fn async_recv_from( &self, buf: &mut [u8], cx: &mut Context<'_>, ) -> Poll<Result<(usize, I::SockAddr)>>
Async method for receiving an ICMP packet.
See [fuchsia_async::net::DatagramSocket::recv_from()
].