pub struct Listner {
pub options: PacketCaptureOptions,
pub tx: Arc<Mutex<Sender<PacketFrame>>>,
pub rx: Arc<Mutex<Receiver<PacketFrame>>>,
pub stop: Arc<Mutex<bool>>,
pub packets: Arc<Mutex<Vec<PacketFrame>>>,
}
Expand description
Listner
Fields§
§options: PacketCaptureOptions
Packet capture options
tx: Arc<Mutex<Sender<PacketFrame>>>
Message Sender
rx: Arc<Mutex<Receiver<PacketFrame>>>
Message Receiver
stop: Arc<Mutex<bool>>
Stop handle
packets: Arc<Mutex<Vec<PacketFrame>>>
Packets store
Implementations§
Source§impl Listner
impl Listner
Sourcepub fn new(options: PacketCaptureOptions) -> Listner
pub fn new(options: PacketCaptureOptions) -> Listner
Create new Listner
Sourcepub fn get_receiver(&self) -> Arc<Mutex<Receiver<PacketFrame>>>
pub fn get_receiver(&self) -> Arc<Mutex<Receiver<PacketFrame>>>
Get progress receiver
Sourcepub fn get_stop_handle(&self) -> Arc<Mutex<bool>>
pub fn get_stop_handle(&self) -> Arc<Mutex<bool>>
Get stop handle
pub fn get_packets(&self) -> Vec<PacketFrame>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Listner
impl RefUnwindSafe for Listner
impl Send for Listner
impl Sync for Listner
impl Unpin for Listner
impl UnwindSafe for Listner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more