目前在做一个项目,接受从千兆网卡传来的数据,数据流量大约160M bit/s,我在c#下用sharppacp来进行抓包,发现有丢包的现象存在,我的代码如下:请各位帮我提提修改意见//Extract a device from the list
PcapDevice device = devices[i];//Open the device for capturing
//true -- means promiscuous mode
//1000 -- means a read wait of 1000msdevice.PcapOpen(true, 1000);
Packet packet = null;//Keep capture packets using PcapGetNextPacket()
while( (packet=device.PcapGetNextPacket()) != null ){ ....}//Close the pcap devicedevice.PcapClose();
PcapDevice device = devices[i];//Open the device for capturing
//true -- means promiscuous mode
//1000 -- means a read wait of 1000msdevice.PcapOpen(true, 1000);
Packet packet = null;//Keep capture packets using PcapGetNextPacket()
while( (packet=device.PcapGetNextPacket()) != null ){ ....}//Close the pcap devicedevice.PcapClose();
解决方案 »
- c# 中动态生成类文件以及添加相应属性
- 小高分求助,关于HttpWebResponse 返回
- Log4Net所产生的日志问题
- c# winform程序 treeview 的checkbox问题
- 关于XML的简单问题,在线等待,解决马上结贴!
- 高手救我!关于case语句的问题!
- 关于c#中的打印问题CrystalReportViewer
- 有关从MemoryStream取数据的一个问题
- “System.NullReferenceException”类型的未经处理的异常出现在 log4net.dll 中
- 关于datagrid的把某一列突出显示,即让某一列的颜色和其他列不同,请问怎么解决!急!
- 求教:WebBrowser中无法自动点击Submit按钮的问题
- 请教各位大侠,c#模仿这个功能可以不呢?
我一直是用的winpcap