Adding a client-side method on the proxy and calling it from the server

In our journey through the recipes from Chapter 3, Using the JavaScript Hubs Client API and their adaptation to the .NET client Hubs library, we have just arrived at the point where we have to modify the recipe that has a similar name, in which we saw how we can define a client-side method to be called directly from inside a remote Hub. The server that we built there is already calling back its caller; therefore, in this recipe, we'll just need to connect to it, call the Say() method, and wait for the callback to happen.

Getting ready

The following code will connect to the EchoHub exposed in the Adding a client-side method on the proxy and calling it from the server recipe from ...

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.