Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npcap thread-safe read; &self for send/recv #26

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

nathaniel-bennett
Copy link
Collaborator

Npcap uses memory-mapped packets for read operations. This PR implements a thread-safe nonblocking algorithm that allows tasks to read distinct packets in the memory-mapped region synchronously. As a side-effect, this enables us to have send()/recv() operations to operate on &self rather than &mut self, which will pave the way for async runtime support.

@nathaniel-bennett nathaniel-bennett force-pushed the windows-const-sendrecv branch 6 times, most recently from 86c3ced to 3e9ec45 Compare February 17, 2025 16:36
@nathaniel-bennett nathaniel-bennett merged commit 2e51c9d into main Feb 17, 2025
9 checks passed
@pkts-rs pkts-rs deleted the windows-const-sendrecv branch February 17, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants