// // IPacketSource.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Diagnostics.CodeAnalysis; namespace Anonymizer.Sinks; /// /// An interface for receiving packets from an arbitrary source. /// public interface IPacketSource { /// /// The current cursor position (current packet index). /// public long Cursor { get; } /// /// Tries to get next packet, if there is any. /// /// /// Moves the cursor. /// /// The cancellation token used for cancelling the operation. /// Null if no more packets are present. public Task TryGetNextPacketAsync(CancellationToken ct = default); }