using System;
using System.Threading;
using System.Threading.Tasks;
namespace KcpSharp
{
///
/// A conversation or a channel over the transport.
///
public interface IKcpConversation : IDisposable
{
///
/// Put message into the receive queue of the channel.
///
/// The packet content with the optional conversation ID. This buffer should not contain space for pre-buffer and post-buffer.
/// The token to cancel this operation.
/// A that completes when the packet is put into the receive queue.
ValueTask InputPakcetAsync(ReadOnlyMemory packet, CancellationToken cancellationToken);
///
/// Mark the underlying transport as closed. Abort all active send or receive operations.
///
void SetTransportClosed();
}
}