public void ChannelEnd(Channel channel) { /* Create cache hash. */ string hash = this._cache.Hash(this._file, this._channelOffset, this._channelLength); /* Save to cache. */ if (this._cache != null && !this._cache.Contains("substream", hash)) { this._cache.Store("substream", hash, this._cacheData, this._channelTotal); } /* Send next substream request. */ try { if (this._channelTotal < this._channelLength) { this._output.AllAvailable = true; return; } this._channelOffset += this._channelLength; hash = this._cache.Hash(this._file, this._channelOffset, this._channelLength); if (this._cache != null && this._cache.Contains("substream", hash)) { this._cache.Load("substream", hash, this); } else { this._protocol.SendSubstreamRequest(this, this._file, this._channelOffset, this._channelLength); } } catch (Exception) { /* Ignore. */ } Channel.Unregister(channel.Id); }
public void ChannelEnd(Channel channel) { this._offset += channel.DataLength; Channel.Unregister(channel.Id); }
public void ChannelEnd(Channel channel) { Channel.Unregister(channel.Id); this._done.Release(); }