using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Controller.Net
{
    /// 
    /// Interface for listening to messages coming through a web socket connection.
    /// 
    public interface IWebSocketListener
    {
        /// 
        /// Processes the message.
        /// 
        /// The message.
        /// Task.
        Task ProcessMessageAsync(WebSocketMessageInfo message);
        /// 
        /// Processes a new web socket connection.
        /// 
        /// An instance of the  interface.
        /// The current http context.
        /// Task.
        Task ProcessWebSocketConnectedAsync(IWebSocketConnection connection, HttpContext httpContext);
    }
}