diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-05-02 00:54:04 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-05-02 00:54:04 +0200 |
| commit | 15634a1913e8c1ad4e921364f30055794644d0bd (patch) | |
| tree | f0dfb3502728e4786de32c0cb4eaabd06f8e2d87 /Emby.Server.Implementations/HttpServer/IHttpListener.cs | |
| parent | 407f54e7764a6bfd8e4ccc0df897fac7e8c658b4 (diff) | |
| parent | 62e251663fce8216cea529f85382299ac2f39fbc (diff) | |
Merge branch 'master' into websocket
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/IHttpListener.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/IHttpListener.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/HttpServer/IHttpListener.cs b/Emby.Server.Implementations/HttpServer/IHttpListener.cs new file mode 100644 index 000000000..501593725 --- /dev/null +++ b/Emby.Server.Implementations/HttpServer/IHttpListener.cs @@ -0,0 +1,39 @@ +#pragma warning disable CS1591 + +using System; +using System.Threading; +using System.Threading.Tasks; +using Emby.Server.Implementations.Net; +using MediaBrowser.Model.Services; +using Microsoft.AspNetCore.Http; + +namespace Emby.Server.Implementations.HttpServer +{ + public interface IHttpListener : IDisposable + { + /// <summary> + /// Gets or sets the error handler. + /// </summary> + /// <value>The error handler.</value> + Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; } + + /// <summary> + /// Gets or sets the request handler. + /// </summary> + /// <value>The request handler.</value> + Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; } + + /// <summary> + /// Gets or sets the web socket handler. + /// </summary> + /// <value>The web socket handler.</value> + Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; } + + /// <summary> + /// Stops this instance. + /// </summary> + Task Stop(); + + Task ProcessWebSocketRequest(HttpContext ctx); + } +} |
