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 4. Groups

This chapter will cover how you can group connections together and target specific groups when sending messages. There will be times when you won't want to broadcast all messages to all clients; groups can help you send messages to the specific groups of connections. SignalR maintains which connections are in what groups, making it very easy to achieve. Groups allows you to join connections. When you are sending a message from the server, you can send it to a specific group by its group name, and only the connections in that group will receive the message, not the other connections.

In this chapter, we will cover the following topics:

  • Establishing groups on the server

  • Sending messages from the client to specific groups

  • Receiving messages from the server about the added groups

  • Composing your UI using AngularJS.

At this stage, the developer should be able to create groups, and put connections into these groups, and have a more maintainable frontend solution.