2019-11-01 10:38:54 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 12:54:44 -07:00
|
|
|
using System;
|
2017-05-21 21:54:02 -07:00
|
|
|
using System.Threading;
|
2014-12-27 15:52:41 -07:00
|
|
|
using System.Threading.Tasks;
|
2018-09-12 10:26:21 -07:00
|
|
|
using Emby.Server.Implementations.Net;
|
2019-01-13 12:20:41 -07:00
|
|
|
using MediaBrowser.Model.Services;
|
2019-03-05 12:35:07 -07:00
|
|
|
using Microsoft.AspNetCore.Http;
|
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>
|
2018-09-12 10:26:21 -07:00
|
|
|
Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; }
|
2014-07-18 15:14:59 -07:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the request handler.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The request handler.</value>
|
2017-09-03 00:28:58 -07:00
|
|
|
Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; }
|
2014-07-18 15:14:59 -07:00
|
|
|
|
|
|
|
/// <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
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Stops this instance.
|
|
|
|
/// </summary>
|
2017-09-03 00:28:58 -07:00
|
|
|
Task Stop();
|
2019-03-05 12:35:07 -07:00
|
|
|
|
|
|
|
Task ProcessWebSocketRequest(HttpContext ctx);
|
2014-07-18 15:14:59 -07:00
|
|
|
}
|
|
|
|
}
|