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: delta.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,20 +49,20 @@ These commands are sent directly between connected peers.
49
49
|`opcode`| Description |
50
50
| :--- | :--- |
51
51
|**`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`. |
53
53
|**`P_MSG`**| A Private Message. The `target` is a specific peer ID. Peers will attempt to bridge the message if not directly connected. |
54
54
|`G_VAR`/`P_VAR`| Variable Sync message. Works like `G_MSG`/`P_MSG`. |
55
55
|`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. |
58
58
|`NEW_CHAN`| A control message sent to a `target` peer to negotiate a new, named data channel. |
59
59
|`PING`/`PONG`| Control messages used for computing RTT. |
60
60
|`HANGUP`/`DECLINE`| Voice call control signals sent to a specific `target` peer. |
61
61
|`WARNING`/`VIOLATION`| State control messages. `WARNINGS` are safe and user-correctable. `VIOLATION`s will result in mandatory disconnects. |
62
62
63
63
#### Packet-specific syntax
64
64
65
-
##### **`G_MSG`/`P_MSG`
65
+
##### **`G_MSG`/`P_MSG`**
66
66
The most common event. Designed for simple messaging or updates.
67
67
```js
68
68
{
@@ -72,7 +72,7 @@ The most common event. Designed for simple messaging or updates.
72
72
}
73
73
```
74
74
75
-
##### **`G_VAR`/`P_VAR`
75
+
##### **`G_VAR`/`P_VAR`**
76
76
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.
77
77
```js
78
78
{
@@ -83,7 +83,7 @@ Used in the Sync plugin to synchronize global/local variables. `payload` can be
83
83
}
84
84
```
85
85
86
-
##### **`G_LIST`/`P_LIST`
86
+
##### **`G_LIST`/`P_LIST`**
87
87
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.
88
88
```js
89
89
{
@@ -95,8 +95,8 @@ Used in the Sync plugin to synchronize global/local lists. `payload` can be a si
95
95
}
96
96
```
97
97
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.**
100
100
```js
101
101
{
102
102
"opcode":"G_MESH"|"P_MESH",
@@ -106,11 +106,11 @@ Used in the Sync plugin for simple broadcasts. `payload` must be a string. `meth
106
106
}
107
107
```
108
108
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.
0 commit comments