IHttpServer.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using MediaBrowser.Common.Net;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Controller.Net
  5. {
  6. /// <summary>
  7. /// Interface IHttpServer
  8. /// </summary>
  9. public interface IHttpServer : IDisposable
  10. {
  11. /// <summary>
  12. /// Gets the URL prefix.
  13. /// </summary>
  14. /// <value>The URL prefix.</value>
  15. IEnumerable<string> UrlPrefixes { get; }
  16. /// <summary>
  17. /// Starts the specified server name.
  18. /// </summary>
  19. /// <param name="urlPrefixes">The URL prefixes.</param>
  20. void StartServer(IEnumerable<string> urlPrefixes);
  21. /// <summary>
  22. /// Gets a value indicating whether [supports web sockets].
  23. /// </summary>
  24. /// <value><c>true</c> if [supports web sockets]; otherwise, <c>false</c>.</value>
  25. bool SupportsWebSockets { get; }
  26. /// <summary>
  27. /// Gets the local end points.
  28. /// </summary>
  29. /// <value>The local end points.</value>
  30. IEnumerable<string> LocalEndPoints { get; }
  31. /// <summary>
  32. /// Stops this instance.
  33. /// </summary>
  34. void Stop();
  35. /// <summary>
  36. /// Gets or sets a value indicating whether [enable HTTP request logging].
  37. /// </summary>
  38. /// <value><c>true</c> if [enable HTTP request logging]; otherwise, <c>false</c>.</value>
  39. bool EnableHttpRequestLogging { get; set; }
  40. /// <summary>
  41. /// Occurs when [web socket connected].
  42. /// </summary>
  43. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  44. /// <summary>
  45. /// Inits this instance.
  46. /// </summary>
  47. void Init(IEnumerable<IRestfulService> services);
  48. }
  49. }