Beispiel #1
0
        public void Load(out IpSettings settingsInstance, string path)
        {
            var ipStrings           = _LoadStringsFromFile(path);
            var sourceEndPoint      = _ParseIPEndPoint(ipStrings.First());
            var destinationEndPoint = _ParseIPEndPoint(ipStrings.Last());

            settingsInstance = new IpSettings
            {
                SourceIPEndPoint      = sourceEndPoint,
                DestinationIPEndPoint = destinationEndPoint
            };
        }
Beispiel #2
0
        public TickTracker(LivePacketDevice device, IpSettings settings)
        {
            _device = device;

            _dstEndPoint = settings.DestinationIPEndPoint;
            _srcEndPoint = settings.SourceIPEndPoint;

            _ticks         = 0;
            _maxTicks      = 0;
            _minTicks      = 0;
            _averageBuffer = new List <int>(__AverageBufferSize);

            _packetReadThread = new Thread(_ReadPacketLoop);
            _updateTickTimer  = new Timer(_UpdateTickTimer, null, Timeout.Infinite, __UpdateInterval);
        }