Skip to content

Commit e738e91

Browse files
committed
Update docs
1 parent 049baf9 commit e738e91

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

delta.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ These commands are sent directly between connected peers.
4949
| `opcode` | Description |
5050
| :--- | :--- |
5151
| **`NEGOTIATE`** | Sent by a client immediately after connecting to another peer. The `payload` contains an object with arbitrary key-value pairs detailing the client's capabilities (e.g., supported features, loaded plugins) for feature negotiation. |
52-
| **`G_MSG`** | A Global Message. The sending peer sets `target` to `*` and sends it to its direct connections. Peers forward it based on the `ttl`. |
52+
| `G_MSG`** | A Global Message. The sending peer sets `target` to `*` and sends it to its direct connections. Peers forward it based on the `ttl`. |
5353
| **`P_MSG`** | A Private Message. The `target` is a specific peer ID. Peers will attempt to bridge the message if not directly connected. |
5454
| `G_VAR`/`P_VAR` | Variable Sync message. Works like `G_MSG`/`P_MSG`. |
5555
| `G_LIST`/`P_LIST`| List Sync message. Works like `G_MSG`/`P_MSG`. |
56-
| `G_MESH` | A global event broadcast. Can be a one-and-done or can await on all recipients. |
57-
| `P_MESH` | A private event broadcast. Can be a one-and-done or can await on the recipient. |
56+
| `G_MESH` | A simple RPC broadcast. Can be a one-and-done or can wait for all recipients to finish performing tasks. |
57+
| `P_MESH` | A simple RPC unicast. Can be a one-and-done or can wait for the recipient to finish performing tasks. |
5858
| `NEW_CHAN` | A control message sent to a `target` peer to negotiate a new, named data channel. |
5959
| `PING`/`PONG` | Control messages used for computing RTT. |
6060
| `HANGUP`/`DECLINE`| Voice call control signals sent to a specific `target` peer. |
6161
| `WARNING`/`VIOLATION`| State control messages. `WARNINGS` are safe and user-correctable. `VIOLATION`s will result in mandatory disconnects. |
6262

6363
#### Packet-specific syntax
6464

65-
##### **`G_MSG`/`P_MSG`
65+
##### **`G_MSG`/`P_MSG`**
6666
The most common event. Designed for simple messaging or updates.
6767
```js
6868
{
@@ -72,7 +72,7 @@ The most common event. Designed for simple messaging or updates.
7272
}
7373
```
7474

75-
##### **`G_VAR`/`P_VAR`
75+
##### **`G_VAR`/`P_VAR`**
7676
Used in the Sync plugin to synchronize global/local variables. `payload` can be any serializable type, `id` must be a string, and they need to be unique, and they need to be unique.
7777
```js
7878
{
@@ -83,7 +83,7 @@ Used in the Sync plugin to synchronize global/local variables. `payload` can be
8383
}
8484
```
8585

86-
##### **`G_LIST`/`P_LIST`
86+
##### **`G_LIST`/`P_LIST`**
8787
Used in the Sync plugin to synchronize global/local lists. `payload` can be a single instance (or an array) of serializable type(s) `id` must be a string, and they need to be unique. `method` is mandatory.
8888
```js
8989
{
@@ -95,8 +95,8 @@ Used in the Sync plugin to synchronize global/local lists. `payload` can be a si
9595
}
9696
```
9797

98-
##### **`G_MESH`/`P_MESH`
99-
Used in the Sync plugin for simple broadcasts. `payload` must be a string. `method` is mandatory. **`G_MESH`/`P_MESH` may only be used on the default data channel.**
98+
##### **`G_MESH`/`P_MESH`**
99+
Used in the Sync plugin as a simple RPC (Remote Procedure Call). `payload` must be a string. `method` is mandatory. `G_MESH`/`P_MESH` may only be used on the default data channel.**
100100
```js
101101
{
102102
"opcode": "G_MESH" | "P_MESH",
@@ -106,11 +106,11 @@ Used in the Sync plugin for simple broadcasts. `payload` must be a string. `meth
106106
}
107107
```
108108

109-
If a sent `G_MESH`/`P_MESH`'s `method` has an `req`, recipients are expected to reply with the following once all event threads have finished execution.
109+
If a sent `G_MESH`/`P_MESH`'s `method` has an `req`, recipients are expected to reply with the following once all RPC threads have finished execution.
110110
```js
111111
{
112112
"opcode": "G_MESH" | "P_MESH",
113-
113+
"payload": string, // broadcast name
114114
"method": 'ack',
115115
"ttl": 1,
116116
}

0 commit comments

Comments
 (0)