Esempio n. 1
0
        /// <summary>
        /// Sends a segment ack
        /// </summary>
        private void _sendSegmentAck(bool nack = false)
        {
            if(_sequenceNumber > _windowStart)
                _windowStart = _sequenceNumber;

            SegmentAckMessage message = new SegmentAckMessage();
            message.ActualWindowSize = (byte)_windowSize;
            message.InvokeId = _invokeId;
            message.Nack = nack;
            message.SequenceNumber = (byte)(_windowStart - 1);
            message.Server = false;

            _host.SendRaw(_device.Address, true, message,
                BufferSegment.Empty);
        }
Esempio n. 2
0
 /// <summary>
 /// Processes a received segment ack
 /// </summary>
 /// <param name="source">The address of the device that sent the ack</param>
 /// <param name="message">The segment ack</param>
 public void ProcessSegmentAck(Address source, SegmentAckMessage message)
 {
     if(message.Server)
     {
         ClientTransaction tx = null;
         lock (_lock)
         {
             tx = _getClientTransaction(source, message.InvokeId);
         }
         if(tx != null)
             tx.OnSegmentAck(message);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Called whenever a segment ack is received
 /// for this transaction
 /// </summary>
 /// <param name="message">The segment ack message</param>
 public void OnSegmentAck(SegmentAckMessage message)
 {
 }