I am working with pcap.net.
I have a communicator that recieves packets. At some point I call the Break() function to stop the capture. after I stopped the capture, I want to continue the capture at some point..
I tried using the RecievePackets(HandlePacket, 0) again, but my GUI froze.. my code:
private void StartCapture()
{
_Communicator.RecievePackets(HandlePacket, 0);
}
private void StopCapture()
{
_Communicator.Break();
}
any help?? thanks
I don't see the code of your GUI, but ReceivePackets() is a blocking call and will hold your thread.
If you're doing this inside the GUI thread, it will freeze your GUI. You should do it in a different thread.