From 05d98fe24c594ae43de4cd9f54139f8b04324119 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 9 Jun 2023 17:11:22 +0200 Subject: Enforce permissions on websocket connections --- MediaBrowser.Controller/Net/IWebSocketConnection.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Controller/Net/IWebSocketConnection.cs') diff --git a/MediaBrowser.Controller/Net/IWebSocketConnection.cs b/MediaBrowser.Controller/Net/IWebSocketConnection.cs index 79f0846b4..bba5a6b85 100644 --- a/MediaBrowser.Controller/Net/IWebSocketConnection.cs +++ b/MediaBrowser.Controller/Net/IWebSocketConnection.cs @@ -1,5 +1,3 @@ -#pragma warning disable CS1591 - using System; using System.Net; using System.Net.WebSockets; @@ -9,6 +7,9 @@ using MediaBrowser.Controller.Net.WebSocketMessages; namespace MediaBrowser.Controller.Net { + /// + /// Interface for WebSocket connections. + /// public interface IWebSocketConnection : IAsyncDisposable, IDisposable { /// @@ -40,6 +41,11 @@ namespace MediaBrowser.Controller.Net /// The state. WebSocketState State { get; } + /// + /// Gets the authorization information. + /// + public AuthorizationInfo AuthorizationInfo { get; } + /// /// Gets the remote end point. /// @@ -65,6 +71,11 @@ namespace MediaBrowser.Controller.Net /// The message is null. Task SendAsync(OutboundWebSocketMessage message, CancellationToken cancellationToken); - Task ProcessAsync(CancellationToken cancellationToken = default); + /// + /// Receives a message asynchronously. + /// + /// The cancellation token. + /// Task. + Task ReceiveAsync(CancellationToken cancellationToken = default); } } -- cgit v1.2.3