Esempio n. 1
0
        } // ReceiverEos

        private void ReceiverLoss(LBMMessage msg)
        {
            _timeOfDay.NewTimeStamp();

            _lossCount++;
            long burstSize = msg.sequenceNumber() - _lastSequenceNum;

            _lastSequenceNum = msg.sequenceNumber();

            // Send no more than one loss/burst report within any 10-second period.
            if ((_timeOfDay.GetSec() - _lossReportSec) >= _parentTmonContext.GetLossSuppress())
            {
                _reportBuffer.Clear();
                _reportBuffer.Append('L'); _reportBuffer.Append(',');
                _reportBuffer.Append(_parentTmonContext.GetMessageHeader());
                _reportBuffer.Append(','); _reportBuffer.Append(_timeOfDay.GetSec());
                _reportBuffer.Append(','); _reportBuffer.Append(_timeOfDay.GetUsec());
                _reportBuffer.Append(','); _reportBuffer.Append(_objectId);
                _reportBuffer.Append(','); _reportBuffer.Append(msg.sequenceNumber());

                _tmonUmSource.send(Encoding.ASCII.GetBytes(_reportBuffer.ToString()), _reportBuffer.Length, 0);
                _lossReportSec = _timeOfDay.GetSec(); /* Remember when the report was made. */
            }
        } // ReceiverLoss