Ver código fonte

Add ProcessWebSocketRequest to IHttpListener

Claus Vium 6 anos atrás
pai
commit
913e80fd55

+ 2 - 3
Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

@@ -756,11 +756,10 @@ namespace Emby.Server.Implementations.HttpServer
 
         public Task ProcessWebSocketRequest(HttpContext context)
         {
-            // TODO
-            return ((WebSocketSharpListener)_socketListener).ProcessWebSocketRequest(context);
+            return _socketListener.ProcessWebSocketRequest(context);
         }
-        //TODO Add Jellyfin Route Path Normalizer
 
+        //TODO Add Jellyfin Route Path Normalizer
         private static string NormalizeEmbyRoutePath(string path)
         {
             if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))

+ 3 - 0
Emby.Server.Implementations/HttpServer/IHttpListener.cs

@@ -3,6 +3,7 @@ using System.Threading;
 using System.Threading.Tasks;
 using Emby.Server.Implementations.Net;
 using MediaBrowser.Model.Services;
+using Microsoft.AspNetCore.Http;
 
 namespace Emby.Server.Implementations.HttpServer
 {
@@ -30,5 +31,7 @@ namespace Emby.Server.Implementations.HttpServer
         /// Stops this instance.
         /// </summary>
         Task Stop();
+
+        Task ProcessWebSocketRequest(HttpContext ctx);
     }
 }