IHttpServer.cs 1.3 KB

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