1 2 3 4 5 6 7 8 9 10 11
use tokio::sync::mpsc::Sender; use tokio::task::JoinHandle; use crate::net::packet::Packet; #[cfg(feature = "real-capture")] pub mod live; /// Anything that can deliver packets onto a channel. pub trait CaptureSource: Send + 'static { fn run(self, tx: Sender<Packet>) -> JoinHandle<()>; }