#pragma warning disable CS1591
using System;
using System.Net;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Net;
namespace MediaBrowser.Controller.Net
{
public interface IWebSocketConnection : IAsyncDisposable, IDisposable
{
///
/// Occurs when [closed].
///
event EventHandler? Closed;
///
/// Gets the last activity date.
///
/// The last activity date.
DateTime LastActivityDate { get; }
///
/// Gets or sets the date of last Keeplive received.
///
/// The date of last Keeplive received.
DateTime LastKeepAliveDate { get; set; }
///
/// Gets or sets the receive action.
///
/// The receive action.
Func? OnReceive { get; set; }
///
/// Gets the state.
///
/// The state.
WebSocketState State { get; }
///
/// Gets the remote end point.
///
/// The remote end point.
IPAddress? RemoteEndPoint { get; }
///
/// Sends a message asynchronously.
///
/// The type of websocket message data.
/// The message.
/// The cancellation token.
/// Task.
/// The message is null.
Task SendAsync(WebSocketMessage message, CancellationToken cancellationToken);
Task ProcessAsync(CancellationToken cancellationToken = default);
}
}