Initial commit

This commit is contained in:
Wiktor Mazur
2019-07-31 20:34:13 +02:00
commit e0b05c8585
6 changed files with 514 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
extern crate packet_sniffer;
use std::sync::mpsc::{Sender, Receiver};
use std::sync::mpsc;
use packet_sniffer::UdpPacket;
fn main() {
let (tx, rx): (Sender<UdpPacket>, Receiver<UdpPacket>) = mpsc::channel();
packet_sniffer::receive(tx);
loop {
println!("{:?}", rx.recv());
}
}