Handling a connection transient state

In the previous recipe, we talked about how a persistent connection can experience problems that SignalR tries to fix automatically. We also saw that such a logical connection is represented by a unique identifier, which is lost when SignalR is not able to recover from underlying failures anymore. As long as the persistent connection is alive, SignalR offers a simple way to associate some transient state to it in the form of a property bag that can be read and written on both the client and server side. For simple scenarios, where we want to maintain some information associated with each connection and use it on both sides to adjust the behavior of available methods/callbacks, this API can be quite useful. ...

Get SignalR Real-time Application Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.