SignalR and groups

Is there a way to get a Caller Group?

To get around this, I created Caller.Group when a client joined the chat. And when sending a message, I do this:

var clients = Hub.GetClients<ChatHub>();
clients[Caller.group].newMessage(String.Format("({0}) <b>{1}</b>: {2}", DateTime.Now.ToString("HH:mm"), Caller.Name, message));
clients.isAlive();

Is this the only way?

+3
source share

All Articles