You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/includes/reference-protobuf-requests.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
+
1
9
### Join groups
2
10
3
11
Format:
@@ -18,7 +26,7 @@ Set `leave_group_message.group` to the group name.
18
26
19
27
Format:
20
28
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)
22
30
23
31
*`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.
24
32
@@ -129,7 +137,7 @@ There's an implicit `dataType`, which can be `protobuf`, `text`, or `binary`, de
129
137
130
138
* `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.
131
139
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.
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/reference-json-reliable-webpubsub-subprotocol.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.date: 01/09/2023
10
10
11
11
# Azure Web PubSub Reliable JSON WebSocket subprotocol
12
12
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.
14
14
15
-
This document describes the subprotocol json.reliable.webpubsub.azure.v1.
15
+
This document describes the subprotocol `json.reliable.webpubsub.azure.v1`.
16
16
17
17
> [!NOTE]
18
18
> 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,
23
23
24
24
A *Reliable PubSub WebSocket client* can:
25
25
26
-
*reconnect a dropped connection.
26
+
*recover a connection from intermittent network issues.
27
27
* recover from message loss.
28
28
* join a group using [join requests](#join-groups).
29
+
* leave a group using [leave requests](#leave-groups).
29
30
* publish messages directly to a group using [publish requests](#publish-messages).
30
31
* route messages directly to upstream event handlers using [event requests](#send-custom-events).
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/reference-json-webpubsub-subprotocol.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,18 @@ ms.date: 01/09/2023
10
10
11
11
# Azure Web PubSub supported JSON WebSocket subprotocol
12
12
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*.
14
14
15
15
16
16
## Overview
17
17
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.
19
19
20
20
With the `json.webpubsub.azure.v1` subprotocol, you can create *PubSub WebSocket clients* that can:
21
21
22
22
* join a group using [join requests](#join-groups).
23
23
* 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).
25
25
26
26
For example, you can create a *PubSub WebSocket client* with the following JavaScript code:
27
27
@@ -44,7 +44,7 @@ Message types received by the client can be:
44
44
45
45
* ack - The response to a request containing an `ackId`.
46
46
* 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.
48
48
49
49
### Ack response
50
50
@@ -142,11 +142,11 @@ If the REST API is sending a string `Hello World` using `application/json` conte
142
142
143
143
### System response
144
144
145
-
The Web PubSub service sends systemrelated responses to client requests.
145
+
The Web PubSub service sends system-related messages to clients.
146
146
147
147
#### Connected
148
148
149
-
The response to the client connect request:
149
+
The message sent to the client when the client successfully connects:
150
150
151
151
```json
152
152
{
@@ -159,7 +159,7 @@ The response to the client connect request:
159
159
160
160
#### Disconnected
161
161
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.
0 commit comments