rust-pcap / pcap

Rust language pcap library
Apache License 2.0
610 stars 138 forks source link

Packets loading slow or "in groups" #202

Closed jabbate19 closed 2 years ago

jabbate19 commented 2 years ago

This may be an issue on my system, but using the example from the rust docs and my custom code the packets come in very slow. It starts, gives me nothing for a while, then all of a sudden all of the packets from when it started to that moment print rapidly. Wireshark running on the side is getting them in real-time. This happens regardless of if Wireshark is open or not, and happens on both MacOS and my Kali VM.

Wojtek242 commented 2 years ago

Did you close the issue, because you solved your issue? If so, could you let us know what was the problem for future reference?

jabbate19 commented 2 years ago

I was having the issue that is solved by adding .timeout() to the capture. I saw it in the README for MacOS after submitting this. I might be blind, but I didn't see it in the rust crate doc, so I wasn't aware of the issue. I feel that should be added to the rust doc for easier reference, but it is working now!