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