private ChangeTrackerResponseCode ProcessRegularStream(Stream stream, CancellationToken token) { if (_changeProcessor == null) { _changeProcessor = new ChunkedChanges(false, token); SetupChangeProcessorCallback(); } if (stream.Length == 3) // +1 for the first type ID { if (!_caughtUp) { _caughtUp = true; if (OnCaughtUp != null) { OnCaughtUp(); } return(ChangeTrackerResponseCode.Normal); } } _changeProcessor.AddData(stream.ReadAllBytes()); return(ChangeTrackerResponseCode.Normal); }
private ChangeTrackerResponseCode ProcessResponseStream(Stream stream, CancellationToken token, bool compressed) { if (_changeProcessor == null) { _changeProcessor = new ChunkedChanges(compressed, token, _pauseWait); SetupChangeProcessorCallback(); } _changeProcessor.AddData(stream); return(ChangeTrackerResponseCode.Normal); }
private ChangeTrackerResponseCode ProcessGzippedStream(Stream stream, CancellationToken token) { if (_changeProcessor == null) { _changeProcessor = new ChunkedChanges(true, token); SetupChangeProcessorCallback(); } _changeProcessor.AddData(stream.ReadAllBytes()); return(ChangeTrackerResponseCode.Normal); }
private ChangeTrackerResponseCode ProcessResponseStream(Stream stream, CancellationToken token, bool compressed) { if (_changeProcessor == null) { _changeProcessor = new ChunkedChanges(compressed, token, _pauseWait); SetupChangeProcessorCallback(); } Log.To.ChangeTracker.D(Tag, "{0} received a {1} stream ({2} bytes)", this, compressed ? "compressed" : "plaintext", stream.Length); _changeProcessor.AddData(stream); return ChangeTrackerResponseCode.Normal; }
private ChangeTrackerResponseCode ProcessResponseStream(Stream stream, CancellationToken token, bool compressed) { if (_changeProcessor == null) { _changeProcessor = new ChunkedChanges(compressed, token, _pauseWait); SetupChangeProcessorCallback(); } Log.To.ChangeTracker.D(Tag, "{0} received a {1} stream ({2} bytes)", this, compressed ? "compressed" : "plaintext", stream.Length); _changeProcessor.AddData(stream); return(ChangeTrackerResponseCode.Normal); }