Exemplo n.º 1
0
        public void RemoveAppConnection(AppConnection connection)
        {
            lock (appConnections)
            {
                appConnections.Remove(connection);
            }

            //TODO: remove itself from SocketManager
        }
Exemplo n.º 2
0
        public Task AddAppContext(AspNetWebSocketContext ctx, Guid userId)
        {
            AppConnection freshConnection = new AppConnection(ctx, userId, this);

            lock (appConnections) {
                appConnections.Add(freshConnection);
            }
            return(freshConnection.GetDataTask);
        }