blob: 7e74a452779e4f575f767f11843660003a54a9b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
}
}
}
|