You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/Emby.Server.Implementations/WebSockets/WebSocketManager.cs

23 lines
560 B

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);
}
}
}