简体   繁体   English

PCap性能

[英]PCap performance

Which c-sharp wrapper of Pcap is fastest? Pcap的哪个c-sharp包装器最快? How fast is PCap compared to using sockets? 与使用套接字相比,PCap的速度有多快?

I believe Pcap.Net is faster than other wrappers since it uses C++/CLI wrapping instead of PInvoke. 我相信Pcap.Net比其他包装器更快,因为它使用C ++ / CLI包装而不是PInvoke。

In general I've never encountered performance issues with WinPcap (it also depends how you use it). 一般来说,我从未遇到过WinPcap的性能问题(这也取决于你如何使用它)。

SharpPcap is appropriate both for capture (sniffing) and transmission (similar to UdpClient and TcpClient). SharpPcap适用于捕获(嗅探)和传输(类似于UdpClient和TcpClient)。 I've used it in an application for high-performance UDP transmission and it could be tweaked to be significantly faster than UdpClient (there are examples of high-perf sending in the source). 我在一个高性能UDP传输应用程序中使用它,它可以调整为比UdpClient快得多(在源代码中有高性能发送的例子)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM