SignalR HubProxy.Invoke Signal Security

My SignalR (.Net) client is a multi-threaded application, can I reuse one IHubProxy in all client application threads? or do I need to synchronize calls with IHubProxy.Invoke?

+4
source share
1 answer

SignalR HubProxy (and by extension HubConnection and Connection ) should be thread safe. In fact, if you call HubConnection.CreateHubProxy several times with the same hubName , you should still get the same cached IHubProxy object.

If you find any problems using IHubProxy in unsynchronized code, report the problem .

+5
source

All Articles