Starting a Hub connection
In this recipe, we'll describe the first operation that is necessary in every client-side portion of a SignalR application: connecting to a server. We'll quickly see how to do it and how the asynchronous nature of SignalR is already clear since the very first step performed by any client.
Getting ready
This recipe is only about performing a connection; that's why we do not need a server-side concrete Hub yet. Therefore, there is only one simple step that we need to perform before moving to the client-side code as follows:
- We need to add an OWIN Startup class and set it up so that the
Configuration()
method callsapp.MapSignalR();
in order to properly initiate the server-side endpoint, as we already did several times in the ...
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.