dotpcap / sharppcap

Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
1.28k stars 267 forks source link

Add CancellationToken support. #512

Open aamereller opened 2 months ago

aamereller commented 2 months ago

In some cases, especially continous or burst send applications or network reactivity tests it may come in handy to be able to cancel an ongoing transmission. For this reason additional functionality and logic supporting .NET CancellationToken functionality has been implemented . Since the native methods do not (and maybe cannot) support this only managed transmission is used when using a cancellation token, regardless whether HW acceleration is available.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 70.76%. Comparing base (e7c4eb8) to head (9f3ed5e). Report is 7 commits behind head on master.

Files Patch % Lines
SharpPcap/LibPcap/SendQueue.cs 90.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #512 +/- ## =========================================== - Coverage 82.81% 70.76% -12.06% =========================================== Files 51 51 Lines 2823 2829 +6 Branches 312 310 -2 =========================================== - Hits 2338 2002 -336 - Misses 363 715 +352 + Partials 122 112 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.