IHttpServer.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /// Stops this instance.
  27. /// </summary>
  28. void Stop();
  29. /// <summary>
  30. /// Gets or sets a value indicating whether [enable HTTP request logging].
  31. /// </summary>
  32. /// <value><c>true</c> if [enable HTTP request logging]; otherwise, <c>false</c>.</value>
  33. bool EnableHttpRequestLogging { get; set; }
  34. /// <summary>
  35. /// Occurs when [web socket connected].
  36. /// </summary>
  37. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  38. /// <summary>
  39. /// Inits this instance.
  40. /// </summary>
  41. void Init(IEnumerable<IRestfulService> services);
  42. }
  43. }