Remove more cruft and add the beginnings of a socket middleware

This commit is contained in:
Claus Vium
2019-02-27 23:22:55 +01:00
parent 71ed840944
commit fb1de5a921
8 changed files with 97 additions and 84 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Concurrent;
using System.Net.WebSockets;
namespace Emby.Server.Implementations.WebSockets
{
public class WebSocketManager
{
private readonly ConcurrentDictionary<Guid, WebSocket> _activeWebSockets;
public WebSocketManager()
{
_activeWebSockets = new ConcurrentDictionary<Guid, WebSocket>();
}
public void AddSocket(WebSocket webSocket)
{
var guid = Guid.NewGuid();
_activeWebSockets.TryAdd(guid, webSocket);
}
}
}