refactor: capture socket and move to capture dir

This commit is contained in:
Cain 2024-02-07 15:28:41 +00:00
parent c34392a3da
commit 9a2b953fff
3 changed files with 219 additions and 224 deletions

View file

@ -1,5 +1,6 @@
pub(crate) mod packet;
mod pcap;
pub(crate) mod socket;
pub(crate) mod writer;
use self::{pcap::Pcap, writer::Writer};
@ -38,4 +39,4 @@ pub fn setup_capture(file_path: Option<PathBuf>) {
///
/// # Errors
/// Returns an Error if the writer is already set.
fn attach(writer: Box<dyn Writer + Send + Sync>) { crate::socket::capture::set_writer(writer); }
fn attach(writer: Box<dyn Writer + Send + Sync>) { crate::capture::socket::set_writer(writer); }