using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Events; using MediaBrowser.Model.Services; using Microsoft.AspNetCore.Http; namespace MediaBrowser.Controller.Net { /// /// Interface IHttpServer /// public interface IHttpServer : IDisposable { /// /// Gets the URL prefix. /// /// The URL prefix. string[] UrlPrefixes { get; } /// /// Stops this instance. /// void Stop(); /// /// Occurs when [web socket connected]. /// event EventHandler> WebSocketConnected; /// /// Inits this instance. /// void Init(IEnumerable services, IEnumerable listener); /// /// If set, all requests will respond with this message /// string GlobalResponse { get; set; } /// /// Sends the http context to the socket listener /// /// /// Task ProcessWebSocketRequest(HttpContext ctx); /// /// The HTTP request handler /// /// /// /// /// /// /// Task RequestHandler(IHttpRequest httpReq, string urlString, string host, string localPath, CancellationToken cancellationToken); } }