using System.Net; using System.Threading.Tasks; using Impostor.Api.Net.Messages; namespace Impostor.Api.Net { /// /// Represents the connection of the client. /// public interface IHazelConnection { /// /// Gets the IP endpoint of the client. /// IPEndPoint EndPoint { get; } /// /// Gets a value indicating whether the client is connected to the server. /// bool IsConnected { get; } /// /// Gets the client of the connection. /// IClient? Client { get; set; } /// /// Sends a message writer to the connection. /// /// The message. /// ValueTask SendAsync(IMessageWriter writer); /// /// Disconnects the client and invokes the disconnect handler. /// /// A reason. /// ValueTask DisconnectAsync(string? reason); } }