문제

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