From 576768de594a56512693715d5748973984fe5f97 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 25 Nov 2014 23:12:29 -0500 Subject: update translations --- MediaBrowser.Controller/Net/IServerManager.cs | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 MediaBrowser.Controller/Net/IServerManager.cs (limited to 'MediaBrowser.Controller/Net/IServerManager.cs') diff --git a/MediaBrowser.Controller/Net/IServerManager.cs b/MediaBrowser.Controller/Net/IServerManager.cs new file mode 100644 index 0000000000..dff0863478 --- /dev/null +++ b/MediaBrowser.Controller/Net/IServerManager.cs @@ -0,0 +1,60 @@ +using MediaBrowser.Common.Net; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Net +{ + /// + /// Interface IServerManager + /// + public interface IServerManager : IDisposable + { + /// + /// Starts this instance. + /// + /// The URL prefixes. + void Start(IEnumerable urlPrefixes); + + /// + /// Sends a message to all clients currently connected via a web socket + /// + /// + /// Type of the message. + /// The data. + /// Task. + void SendWebSocketMessage(string messageType, T data); + + /// + /// Sends a message to all clients currently connected via a web socket + /// + /// + /// Type of the message. + /// The function that generates the data to send, if there are any connected clients + void SendWebSocketMessage(string messageType, Func dataFunction); + + /// + /// Sends a message to all clients currently connected via a web socket + /// + /// + /// Type of the message. + /// The function that generates the data to send, if there are any connected clients + /// The cancellation token. + /// Task. + /// messageType + Task SendWebSocketMessageAsync(string messageType, Func dataFunction, CancellationToken cancellationToken); + + /// + /// Adds the web socket listeners. + /// + /// The listeners. + void AddWebSocketListeners(IEnumerable listeners); + + /// + /// Gets the web socket connections. + /// + /// The web socket connections. + IEnumerable WebSocketConnections { get; } + } +} \ No newline at end of file -- cgit v1.2.3