Prerequisites
Step 1: Configure Site Settings
Step 2: Add the PubSub Component to Your Page
False
Step 3: Generate a Client Token
PubSubClientToken
Step 4: Send Messages
Use the following server actions to send messages:
SendToGroupOnClient
Send a message to a specific group
HubName, PubSubConnectionString, GroupName, Content, ContentType (text/plain or application/json)
text/plain
application/json
SendToAllOnClient
Broadcast a message to all connected clients
HubName, PubSubConnectionString, Content, ContentType
SendToUserOnClient
Send a message to a specific user
HubName, PubSubConnectionString, UserId, Content, ContentType
Example:To send a message to a group:
Notes