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

49 lines
1.5 KiB
C#
Raw Normal View History

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