// // IPacketSender.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading; using System.Threading.Tasks; using Avalonia.Controls; using Remora.Results; namespace PacketLogger.Models.Packets; /// /// A provider that may as well send or receive packets. /// public interface IPacketSender : IPacketProvider { /// /// Send the given packets. /// /// The packet to send. /// The cancellation token used for cancelling the operation. /// A result that may or may not have succeeded. Task SendPacket(string packetString, CancellationToken ct = default); /// /// Receive the given packet. /// /// The packet to send. /// The cancellation token used for cancelling the operation. /// A result that may or may not have succeeded. Task ReceivePacket(string packetString, CancellationToken ct = default); }