using Cysharp.Threading.Tasks;
using System;
using System.Threading;
namespace ShrinkNetwork
{
public interface IShrinkNetworkAsyncTransport : IShrinkNetworkTransport
{
UniTask SendAsync(long sessionId, byte[] packetData);
}
/// Borrowed memory remains owned by caller until SendAsync completes, faults or cancels.
public interface IShrinkNetworkMemoryTransport : IShrinkNetworkAsyncTransport
{
UniTask SendAsync(long sessionId, ReadOnlyMemory packetData, CancellationToken cancellationToken = default);
}
}