O'Reilly logo

SignalR: Real-time Application Development by Einar Ingebrigtsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Groups

This chapter will cover how you can group connections together and target specific groups when sending messages. The topics covered include:

  • Establishing groups on the server
  • Sending messages from the client to specific groups

At this stage, the developer should be able to create groups and put connections into these groups.

Getting specific with groups

Many scenarios require you to not broadcast to everyone, and be more specific in who receives the message. SignalR provides an abstraction for these called groups. Groups hold connections that will receive messages. The API for sending messages is just the same, but you just choose to go to a specific group instead of going to everyone.

For our chat applications we want to use groups ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required