Exemplo n.º 1
0
        private void EnqueueOutput(TimestampedData timestampedData)
        {
            if (this.isStopping)
            {
                this.outputQueue.CompleteAdding();
                return;
            }

            this.outputQueue.Add(timestampedData);
        }
Exemplo n.º 2
0
        private void Output(TimestampedData timestampedData)
        {
            // Only parse the packet header if we need to filter
            if (this.filters.PropertyFilters.Any())
            {
                var packet = new IPPacket(timestampedData.Data);

                if (!this.filters.IsMatch(packet))
                {
                    return;
                }
            }

            this.output.Output(timestampedData);
            Interlocked.Increment(ref this.packetsCaptured);
        }