예제 #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
            };
        }
예제 #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);
        }