Book Image

ServiceStack 4 Cookbook

Book Image

ServiceStack 4 Cookbook

Overview of this book

Table of Contents (18 chapters)
ServiceStack 4 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Broadcasting ServiceStack services with SignalR hubs


SignalR is a popular library for enabling real-time functionality to a web application. A simple use of this library with ServiceStack is to enable the requests or responses of our web services to SignalR clients that are listening to specific groups or methods.

Getting ready

First we are going to need an application to integrate; we will start with a template from the ServiceStackVS Visual Studio extension. If you are using Visual Studio Express, please see the Creating your ServiceStack solution with Visual Studio and NuGet section in Appendix A, Getting Started, and continue from the second instruction in the How to do it… section.

How to do it…

  1. Create a new application using a template from the ServiceStackVS Visual Studio extension. For this example, we will use the ServiceStack ASP.NET Empty template. This is how the template for the new application will look:

  2. Install the SignalR NuGet package in both the main project and the ServiceInterface...