IHttpServer.cs 1.6 KB

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