mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
Remove circular dependency between websocket listeners and manager
This commit is contained in:
@@ -92,6 +92,8 @@ namespace MediaBrowser.Controller.Net
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task ProcessWebSocketConnectedAsync(IWebSocketConnection connection) => Task.CompletedTask;
|
||||
|
||||
/// <summary>
|
||||
/// Starts sending messages over a web socket.
|
||||
/// </summary>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
/// <summary>
|
||||
///This is an interface for listening to messages coming through a web socket connection.
|
||||
/// Interface for listening to messages coming through a web socket connection.
|
||||
/// </summary>
|
||||
public interface IWebSocketListener
|
||||
{
|
||||
@@ -13,5 +13,12 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="message">The message.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ProcessMessageAsync(WebSocketMessageInfo message);
|
||||
|
||||
/// <summary>
|
||||
/// Processes a new web socket connection.
|
||||
/// </summary>
|
||||
/// <param name="connection">An instance of the <see cref="IWebSocketConnection"/> interface.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ProcessWebSocketConnectedAsync(IWebSocketConnection connection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Events;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace MediaBrowser.Controller.Net
|
||||
@@ -11,11 +8,6 @@ namespace MediaBrowser.Controller.Net
|
||||
/// </summary>
|
||||
public interface IWebSocketManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when [web socket connected].
|
||||
/// </summary>
|
||||
event EventHandler<GenericEventArgs<IWebSocketConnection>> WebSocketConnected;
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP request handler.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user