Domanda

From my understanding of the SignalR documentation, you can have 1..* hubs, but only one pipe is created b/t client/server.

I assume multiple hubs is good for organization, so which is best - multiple hubs, or setup a strategy pattern with your main hub connection class that manages tasks (OnConnected, OnReconnected, OnDisconnected...), then create multiple strategy classes to isolate functionality?

È stato utile?

Soluzione

I see it difficult to use a strategy based approach as you need to call dynamic client methods to return data.

This would mean passing reference to the dynamic hub base object which defects the object of hubs.

Essentially the hub is already a strategy on top of the bus context (in pattern terms).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top