public void CaptureData() { ChoosenDevice.OnPacketArrival += new PacketArrivalEventHandler(OnPacketReceive); int readTimeoutMilliseconds = 1000; ChoosenDevice.Open();//DeviceMode.Promiscuous, readTimeoutMilliseconds); ChoosenDevice.Capture(); //ChoosenDevice.Close(); }
public void StopCapturingData() { ChoosenDevice.Close(); }