aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/IWebSocketListener.cs
blob: f1a75d51805d6c7ba0a56177f6e034575a5c9d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Threading.Tasks;

namespace MediaBrowser.Controller.Net
{
    /// <summary>
    /// Interface for listening to messages coming through a web socket connection.
    /// </summary>
    public interface IWebSocketListener
    {
        /// <summary>
        /// Processes the message.
        /// </summary>
        /// <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);
    }
}