public SubscriptionList(Socket socket) { _subscribedSockets = new ConcurrentDictionary<int, Socket> { [socket.GetHashCode()] = socket }; }
public void Remove(Socket socket) { Socket _; _subscribedSockets.TryRemove(socket.GetHashCode(), out _); }
public bool Add(Socket socket) => _subscribedSockets.TryAdd(socket.GetHashCode(), socket);