jellyfin-server/Emby.Server.Implementations/HttpServer/IHttpListener.cs

38 lines
1.1 KiB
C#
Raw Normal View History

using System;
2017-05-22 04:54:02 +00:00
using System.Threading;
2014-12-27 22:52:41 +00:00
using System.Threading.Tasks;
2018-09-12 17:26:21 +00:00
using Emby.Server.Implementations.Net;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
2014-07-18 22:14:59 +00:00
2016-11-04 01:18:51 +00:00
namespace Emby.Server.Implementations.HttpServer
2014-07-18 22:14:59 +00:00
{
public interface IHttpListener : IDisposable
{
/// <summary>
/// Gets or sets the error handler.
/// </summary>
/// <value>The error handler.</value>
2018-09-12 17:26:21 +00:00
Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; }
2014-07-18 22:14:59 +00:00
/// <summary>
/// Gets or sets the request handler.
/// </summary>
/// <value>The request handler.</value>
2017-09-03 07:28:58 +00:00
Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; }
2014-07-18 22:14:59 +00:00
/// <summary>
/// Gets or sets the web socket handler.
/// </summary>
/// <value>The web socket handler.</value>
2015-03-08 19:48:30 +00:00
Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; }
2014-07-18 22:14:59 +00:00
/// <summary>
/// Stops this instance.
/// </summary>
2017-09-03 07:28:58 +00:00
Task Stop();
Task ProcessWebSocketRequest(HttpContext ctx);
2014-07-18 22:14:59 +00:00
}
}