In this chapter, we will learn about MicrosoftSignalR, which is a library fordoingreal-time communication between the client and the server. It allows the server to call the client of its own initiative, not as a result of a request. It builds on well-known technologies such as AJAX, WebSockets, and server-sent events, but in a transparent manner. You do not need to know what it's using—it basically just works, regardless of the browser you have. It also supports quite a lot of browsers, including mobile phones. Let's explore this technology and see what it has to offer—essentially, the following:
- Setting up SignalR
- Sending messages from the client to the server
- Broadcasting messages from the server to all/some clients
- Sending messages from outside a hub
After reading this chapter, you will learn how to communicate...