Skip to content

Commit 35311af

Browse files
Merge pull request #224954 from cebundy/wps-refs
[Web PubSub] review input from previous PR 223135
2 parents aef8654 + 7cdaed2 commit 35311af

File tree

5 files changed

+23
-14
lines changed

5 files changed

+23
-14
lines changed

articles/azure-web-pubsub/includes/reference-json-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: vicancy
33
ms.author: lianwei
44
ms.service: azure-web-pubsub
55
ms.topic: include
6-
ms.date: 08/06/2021
6+
ms.date: 01/24/2023
77
---
88

99
### Join groups

articles/azure-web-pubsub/includes/reference-permission.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: vicancy
33
ms.author: lianwei
44
ms.service: azure-web-pubsub
55
ms.topic: include
6-
ms.date: 08/06/2021
6+
ms.date: 01/24/2023
77
---
88

99
## Permissions

articles/azure-web-pubsub/includes/reference-protobuf-requests.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
author: vicancy
3+
ms.author: lianwei
4+
ms.service: azure-web-pubsub
5+
ms.topic: include
6+
ms.date: 01/24/2023
7+
---
8+
19
### Join groups
210

311
Format:
@@ -18,7 +26,7 @@ Set `leave_group_message.group` to the group name.
1826

1927
Format:
2028

21-
* `ackId`: The unique identity of each request. The service sends a [ack response message](#ack-response) to notify the process result of the request. More details can be found at [AckId and Ack Response](../concept-client-protocols.md#ackid-and-ack-response)
29+
* `ackId`: The unique identity of each request. The service sends an [ack response message](#ack-response) to notify the process result of the request. More details can be found at [AckId and Ack Response](../concept-client-protocols.md#ackid-and-ack-response)
2230

2331
* `dataType`: The data format, which can be `protobuf`, `text`, or `binary` depending on the `data` in `MessageData`. The receiving clients can use `dataType` to correctly process the content.
2432

@@ -129,7 +137,7 @@ There's an implicit `dataType`, which can be `protobuf`, `text`, or `binary`, de
129137
130138
* `text`: When you set `event_message.data.text_data`, the implicit `dataType` is `text`. The `text_data` value should be a string. The event handler receives a UTF-8-encoded string.
131139
132-
* `binary`: When you set `event_message.data.binary_data`, the implicit `dataType` is `binary`. The `binary_data` value should be a byte array. The event handler receives the simple WebSocket binary frame.
140+
* `binary`: When you set `event_message.data.binary_data`, the implicit `dataType` is `binary`. The `binary_data` value should be a byte array. The event handler receives the raw binary frame.
133141
134142
#### Case 1: Send an event with text data
135143

articles/azure-web-pubsub/reference-json-reliable-webpubsub-subprotocol.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ ms.date: 01/09/2023
1010

1111
# Azure Web PubSub Reliable JSON WebSocket subprotocol
1212

13-
The JSON WebSocket subprotocol, `json.reliable.webpubsub.azure.v1`, enables the highly reliable exchange of publish/subscribe messages directly between clients even during network issues.
13+
The JSON WebSocket subprotocol, `json.reliable.webpubsub.azure.v1`, enables the highly reliable exchange of publish/subscribe messages directly between clients through the service without a round trip to the upstream server.
1414

15-
This document describes the subprotocol json.reliable.webpubsub.azure.v1.
15+
This document describes the subprotocol `json.reliable.webpubsub.azure.v1`.
1616

1717
> [!NOTE]
1818
> Reliable protocols are still in preview. Some changes are expected in the future.
@@ -23,9 +23,10 @@ To overcome intermittent network issues and maintain reliable message delivery,
2323

2424
A *Reliable PubSub WebSocket client* can:
2525

26-
* reconnect a dropped connection.
26+
* recover a connection from intermittent network issues.
2727
* recover from message loss.
2828
* join a group using [join requests](#join-groups).
29+
* leave a group using [leave requests](#leave-groups).
2930
* publish messages directly to a group using [publish requests](#publish-messages).
3031
* route messages directly to upstream event handlers using [event requests](#send-custom-events).
3132

articles/azure-web-pubsub/reference-json-webpubsub-subprotocol.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ ms.date: 01/09/2023
1010

1111
# Azure Web PubSub supported JSON WebSocket subprotocol
1212

13-
The JSON WebSocket subprotocol, `json.webpubsub.azure.v1`, enables the exchange of publish/subscribe messages directly between clients. A WebSocket connection using the `json.webpubsub.azure.v1` subprotocol is called a *PubSub WebSocket client*.
13+
The JSON WebSocket subprotocol, `json.webpubsub.azure.v1`, enables the exchange of publish/subscribe messages between clients through the service without a round trip to the upstream server. A WebSocket connection using the `json.webpubsub.azure.v1` subprotocol is called a *PubSub WebSocket client*.
1414

1515

1616
## Overview
1717

18-
In a simple WebSocket client, a *server* role is required to handle events from clients. A simple WebSocket connection triggers a `message` event when it sends messages and relies on the server-side to process messages and do other operations.
18+
A simple WebSocket connection triggers a `message` event when it sends messages and relies on the server-side to process messages and do other operations.
1919

2020
With the `json.webpubsub.azure.v1` subprotocol, you can create *PubSub WebSocket clients* that can:
2121

2222
* join a group using [join requests](#join-groups).
2323
* publish messages directly to a group using [publish requests](#publish-messages).
24-
* route messages directly to upstream event handlers using [event requests](#send-custom-events).
24+
* route messages to different upstream event handlers using [event requests](#send-custom-events).
2525

2626
For example, you can create a *PubSub WebSocket client* with the following JavaScript code:
2727

@@ -44,7 +44,7 @@ Message types received by the client can be:
4444

4545
* ack - The response to a request containing an `ackId`.
4646
* message - Messages from the group or server.
47-
* system - Responses from the Web PubSub service to system related client requests.
47+
* system - Messages from the Web PubSub service.
4848

4949
### Ack response
5050

@@ -142,11 +142,11 @@ If the REST API is sending a string `Hello World` using `application/json` conte
142142

143143
### System response
144144

145-
The Web PubSub service sends system related responses to client requests.
145+
The Web PubSub service sends system-related messages to clients.
146146

147147
#### Connected
148148

149-
The response to the client connect request:
149+
The message sent to the client when the client successfully connects:
150150

151151
```json
152152
{
@@ -159,7 +159,7 @@ The response to the client connect request:
159159

160160
#### Disconnected
161161

162-
The response when the server closes the connection, or when the service declines the client.
162+
The message sent to the client when the server closes the connection, or when the service declines the client.
163163

164164
```json
165165
{

0 commit comments

Comments
 (0)