#pragma warning disable CS1591
#nullable enable
using System;
using System.Net;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Net;
using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Controller.Net
{
public interface IWebSocketConnection
{
///
/// 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 query string.
///
/// The query string.
IQueryCollection QueryString { get; }
///
/// 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 message.
/// The cancellation token.
/// Task.
/// message
Task SendAsync(WebSocketMessage message, CancellationToken cancellationToken);
Task ProcessAsync(CancellationToken cancellationToken = default);
}
}