IHttpServer.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Services;
  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. /// Stops this instance.
  23. /// </summary>
  24. void Stop();
  25. /// <summary>
  26. /// Occurs when [web socket connected].
  27. /// </summary>
  28. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  29. /// <summary>
  30. /// Occurs when [web socket connecting].
  31. /// </summary>
  32. event EventHandler<WebSocketConnectingEventArgs> WebSocketConnecting;
  33. /// <summary>
  34. /// Inits this instance.
  35. /// </summary>
  36. void Init(IEnumerable<IService> services);
  37. /// <summary>
  38. /// If set, all requests will respond with this message
  39. /// </summary>
  40. string GlobalResponse { get; set; }
  41. }
  42. }