Chapter 4. Persistent connections

The lower-level API with which we can approach the persistent connection that SignalR offers is illustrated in Figure 4-1. This API provides us with a layer of abstraction that isolates us from the complexities inherent to keeping a permanent connection open between the client and the server and from the transports used to send information between both ends.

A diagram showing the abstraction levels used by SignalR to communicate between the client and the server. Starting at the bottom (at the lowest level of abstraction) are the Internet protocols. These support the transports used to maintain the virtual connection (WebSockets, Server-Sent Events, forever frame, and long polling). Above them are persistent connections and, at the highest level of abstraction, hubs.

Figure 4-1. Abstraction levels used by SignalR.

In practice, this API gives us access to the communication channel that is quite similar to the one used traditionally when working at a low abstraction level with sockets: On the server side, we can be notified ...

Get SignalR Programming in Microsoft ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.