2
0

IHttpListener.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. using Emby.Server.Implementations.Net;
  5. using MediaBrowser.Model.Services;
  6. namespace Emby.Server.Implementations.HttpServer
  7. {
  8. public interface IHttpListener : IDisposable
  9. {
  10. /// <summary>
  11. /// Gets or sets the error handler.
  12. /// </summary>
  13. /// <value>The error handler.</value>
  14. Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; }
  15. /// <summary>
  16. /// Gets or sets the request handler.
  17. /// </summary>
  18. /// <value>The request handler.</value>
  19. Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; }
  20. /// <summary>
  21. /// Gets or sets the web socket handler.
  22. /// </summary>
  23. /// <value>The web socket handler.</value>
  24. Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; }
  25. /// <summary>
  26. /// Stops this instance.
  27. /// </summary>
  28. Task Stop();
  29. }
  30. }