SignalR/SignalR — Issue #178: Enumerate connected clients on ASP.NET server
Author: PaloMraz
Created: 2012-02-06 21:08:27+00:00
State: open

The ability to enumerate all connected clients on the server side would be very useful. For example consider this method on a Hub-derived hub:
```
public void SendMessageToAllJohns(string message)
{
foreach (var client in this.Clients) // or could create a snapshot if threading is an issue
{
string name = client.name as string; // name is custom property set in javascript on the client
if (name == "john")
{
client.receviveMessage(message);	// this is the client-side javascript callback
}
}
}
```
(I'm sorry but I couldn't get the thing to indent properly - tried spaces, tabs with no luck:-()