SignalR send message to single connectionId SignalR send message to single connectionId asp.net asp.net

SignalR send message to single connectionId


Well, you can send a message to a single client from a Hub like so:

Clients.Client(someConnectionIdIWantToSendToSpecifically).doSomething();

The trick is you need to know the connection ID you want to send the message to. Even more specifically you probably want to know the logical identity of the thing you want to send the message too since that logical identity could have multiple connections or have dropped and reconnected under a completely different connection id. Mapping of connections to logical identities is something SignalR leaves up to the application itself.