mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Fix sending websocket messages (#9948)
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Net;
|
||||
using System.Net.WebSockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Net.WebSocketMessages;
|
||||
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
@@ -45,6 +46,15 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <value>The remote end point.</value>
|
||||
IPAddress? RemoteEndPoint { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="ArgumentNullException">The message is null.</exception>
|
||||
Task SendAsync(OutboundWebSocketMessage message, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message asynchronously.
|
||||
/// </summary>
|
||||
@@ -53,7 +63,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="ArgumentNullException">The message is null.</exception>
|
||||
Task SendAsync<T>(WebSocketMessage<T> message, CancellationToken cancellationToken);
|
||||
Task SendAsync<T>(OutboundWebSocketMessage<T> message, CancellationToken cancellationToken);
|
||||
|
||||
Task ProcessAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user