سؤال

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?

هل كانت مفيدة؟

المحلول

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).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top