Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding same connectionId multiple times in a signalR group

Tags:

signalr

I have two methods in my hub that should add a connectionId in the same group (among other things).

Is there a problem, adding the same connectionId multiple times to the same group? Will I get multiple events on the browser when calling a client method for this group? Will this slow down the server performance?

I searched about possible causes of doing that but I didn't find anything that could help me.

like image 840
amp Avatar asked Mar 16 '23 13:03

amp


1 Answers

For a detailed answer you can browse the code to find out: https://github.com/SignalR/SignalR/tree/master/src/Microsoft.AspNet.SignalR.Core

I tried connecting to the same group multiple times, but whenever the event fires the subscribed client receives it only once, which I think makes sense. So they probably map connectionIDs to group, which means multiple connection makes no change from connecting once

like image 149
DDan Avatar answered Apr 28 '23 05:04

DDan