Exemplo n.º 1
0
        public override Task OnConnected()
        {
            Logger.Info($"Client {this.Context.ConnectionId} connected!");

            tokenSource       = new CancellationTokenSource();
            cancellationToken = tokenSource.Token;
            if (!ClientsList.Any())
            {
                ClientsList.Add(this.Context.ConnectionId);
                Logger.Info($"Client first!");
                First = true;
            }
            else
            {
                return(Task);
            }

            return(base.OnConnected());
        }