Rectangle 27 0

So SignalR does not actually validate if your sending to an invalid ConnectionId. The reason why this does not occur is because ConnectionId's for clients are a lot like SignalR groups. They reference a topic that can be subscribed and published to.

Therefore when sending to an invalid ConnectionId you push a message to a topic that doesn't exist yet; so it's created. The reasoning behind this is if a client happens to come to the server with that connection id via a reconnect or by other means they will then receive any messages that they had missed during their down time.

Sooo for your case I'd recommend tracking clients via the OnConnected and OnDisconnected methods and then running logic to verify that they are present prior to sending to them.

Exception when sending message to disconnected client in SignalR - Sta...

signalr signalr-hub
Rectangle 27 0

As you seem to understand, which groups a logical connection (user if you will) is in is something you the application writer is responsible for maintaining across network disconnects/reconnects. If you look at the way JabbR does this, it maintains the state of which "rooms" a user is in in its database. Upon reconnecting, a user's identity helps place the current connection back into the proper set of groups that represent the specific "rooms".

Thanks Drew - I assumed as much, but hoped I was missing the obvious - will grab the jabbr code and look at how they're handing group membership. really is something I feel the documentation would gain from - I suspect it's the pain point of being a (relatively) early adopter though.

signalR groups - connecting/disconnecting and sending - am I missing s...

Rectangle 27 0

Your second approach is the best one right now. We are investigating adding a feature in a future version that will let you immediately disconnect a client from the server-side.

=> I'm looking forward to new releases with this feature. Thanks for advice.

c# - Stop sending updates to specific groups in signalR - Stack Overfl...

c# jquery web-services signalr
Rectangle 27 0

In signalr you can use the concept of groups since state is missing by default. To send messages to a specific client you can map users to connections

yes i knew concept of groups . its seem difficult to implement in small demo. i just needed to make a test demo .

Hi Tariq. Groups are easy to use, but not very dynamic. A custom implementation where you map users to connections is what I would use. Do note that you will need win8+ and .NET 4.5 to get websockets since you use desktop clients

how to send data from server to specific client ID on button click in ...

Rectangle 27 0

Groups.Add returns a Task. You should await the the call to Groups.Add before sending a message to the group that you expect the newly added client to receive.

Thanks a lot! If I'm not mistaking, this method didn't run asynchronously in beta version of SignalR - Signalr Groups only send data to first connected client - St... signalr