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