Example #1
0
        public override void Process()
        {
            //If we want to send this message to all clients
            //Broadcaster.Broadcast($"Hello {_value}!");

            //antoher option could be to filter the clients
            Broadcaster.Filter(i => i.Id == 123).Broadcast($"Hello {_value}!");
        }
Example #2
0
 public override async Task Activate()
 {
     await Task.Factory.StartNew(() =>
     {
         var rng    = rnd.Next(0, Broadcaster.Clients.Count());
         var client = Broadcaster.Clients.Skip(rng).First();
         Broadcaster
         .Filter(i => i.Id == client.Id)
         .Broadcast("Hello, I am the people poker and you have been randomly selected to receive a poke.");
     });
 }
Example #3
0
 public async override Task ProcessAsync()
 {
     Broadcaster.Filter(i => i.Id == Clients.Logger).Broadcast("The void consumes all.");
 }
Example #4
0
 public override void Process()
 {
     Broadcaster.Filter(i => i.Id == Clients.Logger).Broadcast("The void consumes all.");
 }