using System.Net; using System.Net.Sockets; namespace NahidaImpact.Kcp { /// /// A transport to send and receive packets. /// public interface IKcpTransport { /// /// Send a packet into the transport. /// /// The content of the packet. /// The remote endpoint /// A token to cancel this operation. /// A that completes when the packet is sent. ValueTask SendPacketAsync(Memory packet, IPEndPoint remoteEndpoint, CancellationToken cancellationToken); void SetCallbacks(int handshakeSize, Func handshakeHandler); } }