Book Image

SignalR: Real-time Application Development - Second Edition

By : Einar Ingerbrigsten
Book Image

SignalR: Real-time Application Development - Second Edition

By: Einar Ingerbrigsten

Overview of this book

Table of Contents (19 chapters)
SignalR – Real-time Application Development Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
11
Hosting a Server Using Self-hosted OWIN
Index

Chapter 3. Hubs

With persistent connections, we have to manage everything going back and forth with the server. The only thing abstracted away is the transport. Typically, in applications, you are looking at calling well-defined resources on the server and would probably want to deal with those rather than the raw power of persistent connections. This chapter will cover how you connect a client with a server in a very different way, making it seem like you can call code directly on the client from the server and vice versa.

Topics covered in this chapter are as follows:

  • Setting up a hub on the server

  • Working with hubs

  • Consuming a hub from a JavaScript client

  • Improving the usage of a hub in an AngularJS application

At this stage, the developer should be able to use a hub, and our sample app will now be able to chat properly.