2014-12-27 15:52:41 -07:00
|
|
|
|
using MediaBrowser.Controller.Net;
|
2014-07-18 15:14:59 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2014-12-27 15:52:41 -07:00
|
|
|
|
using System.Threading.Tasks;
|
2016-10-25 12:02:04 -07:00
|
|
|
|
using MediaBrowser.Model.Services;
|
2014-07-18 15:14:59 -07:00
|
|
|
|
|
2016-11-03 18:18:51 -07:00
|
|
|
|
namespace Emby.Server.Implementations.HttpServer
|
2014-07-18 15:14:59 -07:00
|
|
|
|
{
|
|
|
|
|
public interface IHttpListener : IDisposable
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the error handler.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The error handler.</value>
|
2016-12-26 10:38:12 -07:00
|
|
|
|
Action<Exception, IRequest, bool> ErrorHandler { get; set; }
|
2014-07-18 15:14:59 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the request handler.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The request handler.</value>
|
|
|
|
|
Func<IHttpRequest, Uri, Task> RequestHandler { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the web socket handler.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The web socket handler.</value>
|
2015-03-08 12:48:30 -07:00
|
|
|
|
Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; }
|
2014-07-18 15:14:59 -07:00
|
|
|
|
|
2015-03-08 12:48:30 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the web socket connecting.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The web socket connecting.</value>
|
|
|
|
|
Action<WebSocketConnectingEventArgs> WebSocketConnecting { get; set; }
|
|
|
|
|
|
2014-07-18 15:14:59 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Starts this instance.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="urlPrefixes">The URL prefixes.</param>
|
|
|
|
|
void Start(IEnumerable<string> urlPrefixes);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stops this instance.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Stop();
|
|
|
|
|
}
|
|
|
|
|
}
|