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}!"); }
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."); }); }
public async override Task ProcessAsync() { Broadcaster.Filter(i => i.Id == Clients.Logger).Broadcast("The void consumes all."); }
public override void Process() { Broadcaster.Filter(i => i.Id == Clients.Logger).Broadcast("The void consumes all."); }