Struct libp2p_quic::async_std::Provider
source · pub struct Provider { /* private fields */ }
Available on crate feature
async-std
only.Expand description
Provider for reading / writing to a sockets and spawning
tasks using [async-std
].
Trait Implementations§
source§impl Provider for Provider
impl Provider for Provider
type IfWatcher = IfWatcher<SmolSocket>
source§fn from_socket(socket: UdpSocket) -> Result<Self>
fn from_socket(socket: UdpSocket) -> Result<Self>
Create a new providing that is wrapping the socket. Read more
source§fn poll_recv_from(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(Vec<u8>, SocketAddr)>>
fn poll_recv_from( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(Vec<u8>, SocketAddr)>>
Receive a single packet. Read more
source§fn start_send(&mut self, data: Vec<u8>, addr: SocketAddr)
fn start_send(&mut self, data: Vec<u8>, addr: SocketAddr)
Set sending a packet on the socket. Read more
source§fn poll_send_flush(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_send_flush(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
Flush a packet send in
Provider::start_send
. Read moresource§fn spawn(future: impl Future<Output = ()> + Send + 'static)
fn spawn(future: impl Future<Output = ()> + Send + 'static)
Run the given future in the background until it ends. Read more