Struct libp2p_quic::tokio::Provider
source · pub struct Provider { /* private fields */ }
Available on crate feature
tokio
only.Expand description
Provider for reading / writing to a sockets and spawning
tasks using tokio
.
Trait Implementations§
source§impl Provider for Provider
impl Provider for Provider
type IfWatcher = IfWatcher<TokioSocket>
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_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 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 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