public void RemoveAppConnection(AppConnection connection) { lock (appConnections) { appConnections.Remove(connection); } //TODO: remove itself from SocketManager }
public Task AddAppContext(AspNetWebSocketContext ctx, Guid userId) { AppConnection freshConnection = new AppConnection(ctx, userId, this); lock (appConnections) { appConnections.Add(freshConnection); } return(freshConnection.GetDataTask); }