We can create several hubs for different things, and for connecting to each hub we can create several client nodes with joint connection, so that one connection is made with all concentrators. Now the problem arises that the method associated with the hub does not rise with each code on the server-hub side.
public class Hub1 : Hub { public override Task OnConnected() { return base.OnConnected(); } } public class Hub2 : Hub { public override Task OnConnected() { return base.OnConnected(); } }
let's say on the client side I create hub1 and hub2 with client-side methods defined on both hubs, then only one of the onConnected hubs is called on the server side. If I create client-side hubs with separate connections, then the OnConnected method is called. So, is there any other work if I want to use the same connection for each hub, but would also like to raise the Connected event of the individual hubs.
source share