IHttpServer.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 the local end points.
  23. /// </summary>
  24. /// <value>The local end points.</value>
  25. IEnumerable<string> LocalEndPoints { get; }
  26. /// <summary>
  27. /// Stops this instance.
  28. /// </summary>
  29. void Stop();
  30. /// <summary>
  31. /// Occurs when [web socket connected].
  32. /// </summary>
  33. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  34. /// <summary>
  35. /// Inits this instance.
  36. /// </summary>
  37. void Init(IEnumerable<IRestfulService> services);
  38. }
  39. }