IHttpServer.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /// <param name="certificatePath">If an https prefix is specified,
  21. /// the ssl certificate localtion on the file system.</param>
  22. void StartServer(IEnumerable<string> urlPrefixes, string certificatePath);
  23. /// <summary>
  24. /// Gets the local end points.
  25. /// </summary>
  26. /// <value>The local end points.</value>
  27. IEnumerable<string> LocalEndPoints { get; }
  28. /// <summary>
  29. /// Stops this instance.
  30. /// </summary>
  31. void Stop();
  32. /// <summary>
  33. /// Occurs when [web socket connected].
  34. /// </summary>
  35. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  36. /// <summary>
  37. /// Inits this instance.
  38. /// </summary>
  39. void Init(IEnumerable<IRestfulService> services);
  40. }
  41. }