2
0

IWebSocketManager.cs 943 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. using Jellyfin.Data.Events;
  5. using Microsoft.AspNetCore.Http;
  6. namespace MediaBrowser.Controller.Net
  7. {
  8. /// <summary>
  9. /// Interface IHttpServer.
  10. /// </summary>
  11. public interface IWebSocketManager
  12. {
  13. /// <summary>
  14. /// Occurs when [web socket connected].
  15. /// </summary>
  16. event EventHandler<GenericEventArgs<IWebSocketConnection>> WebSocketConnected;
  17. /// <summary>
  18. /// Inits this instance.
  19. /// </summary>
  20. /// <param name="listeners">The websocket listeners.</param>
  21. void Init(IEnumerable<IWebSocketListener> listeners);
  22. /// <summary>
  23. /// The HTTP request handler.
  24. /// </summary>
  25. /// <param name="context">The current HTTP context.</param>
  26. /// <returns>The task.</returns>
  27. Task WebSocketRequestHandler(HttpContext context);
  28. }
  29. }