开发者

SharpPcap OnPcapStatistics event never fires?

I am trying to get SharpPcap Statistics to work, but the OnPcapStatistics event never fires.

Here's the code: SharpPcap Example 11: statistics

Code project articl开发者_运维技巧e: SharpPcap: Statistics

Does anyone know why?


You just found a bug!

WinPcapDevice was creating a new SendPacketArrivalEvent() instead of overriding it. Modified PcapDevice.SendPacketArrivalEvent() to be a virtual and WinPcapDevice.SendPacketArrivalEvent() to be an override and now the correct method is called.

The issue was that because WinPcapDevice was creating a new method instead of overriding it that PcapDevice was capturing a packet and calling its own SendPacketArrivalEvent(). This implementation doesn't handle statistics events as they are specific to WinPcapDevices.

Fixed the issue, updated the assembly info to 4.0.1 and uploaded the assembly to filedropper:

http://www.filedropper.com/sharppcap

If you could try that and see that it works I'll check the fix into git and it will go out with the next release of SharpPcap.

Thanks again for the bug report.

Chris

Author of SharpPcap

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜