|
2 | 2 | > |
3 | 3 | > This is a provisional and incomplete draft of the CloudLink 5.1 "Delta" protocol. The features, commands, and schemas described are for discussion and are subject to change. |
4 | 4 | > |
5 | | -> Last revision: October 26, 2025 @ 12:41 PM EDT. |
| 5 | +> Last revision: April 2, 2026 @ 6:52 PM EDT. |
6 | 6 |
|
7 | 7 | # CloudLink 5.1 ("Delta") Protocol |
8 | 8 |
|
@@ -49,16 +49,17 @@ 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 | | -| `G_VAR`/`P_VAR` | Variable Sync message. Works like `G_MSG`/`P_MSG`. | |
55 | | -| `G_LIST`/`P_LIST`| List Sync message. Works like `G_MSG`/`P_MSG`. | |
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 | | -| `NEW_CHAN` | A control message sent to a `target` peer to negotiate a new, named data channel. | |
59 | | -| `PING`/`PONG` | Control messages used for computing RTT. | |
60 | | -| `HANGUP`/`DECLINE`| Voice call control signals sent to a specific `target` peer. | |
61 | | -| `WARNING`/`VIOLATION`| State control messages. `WARNINGS` are safe and user-correctable. `VIOLATION`s will result in mandatory disconnects. | |
| 54 | +| **`G_VAR`/`P_VAR`** | Variable Sync message. Works like `G_MSG`/`P_MSG`. | |
| 55 | +| **`G_LIST`/`P_LIST`** | List Sync message. Works like `G_MSG`/`P_MSG`. | |
| 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 | +| **`NEW_CHAN`** | A control message sent to a `target` peer to negotiate a new, named data channel. | |
| 59 | +| **`PING`/`PONG`** | Control messages used for computing RTT. | |
| 60 | +| **`CALL`/`ANSWER`/`HANGUP`/`DECLINE`** | Voice call control signals sent to a specific `target` peer. | |
| 61 | +| **`WARNING`/`VIOLATION`** | State control messages. `WARNINGS` are safe and user-correctable. `VIOLATION`s will result in mandatory disconnects. | |
| 62 | +| **`HELLO`** | Advertises peer's preferred name and designation info. Only used if it has support for the discovery feature/plugin. | |
62 | 63 |
|
63 | 64 | #### Packet-specific syntax |
64 | 65 |
|
@@ -165,6 +166,20 @@ A reply message to `PING` should contain the original `t1` timestamp as well as |
165 | 166 | } |
166 | 167 | ``` |
167 | 168 |
|
| 169 | +##### **`HELLO`** |
| 170 | +Advertises peer's preferred name and designation info. Only used if it has support for the discovery feature/plugin. |
| 171 | + |
| 172 | +```js |
| 173 | +{ |
| 174 | + "opcode": "HELLO", |
| 175 | + "payload": { |
| 176 | + name: string; // "SOMEBODY" |
| 177 | + designation: string; // "US-NKY-1" |
| 178 | + }, |
| 179 | + "ttl": 1, |
| 180 | +} |
| 181 | +``` |
| 182 | + |
168 | 183 | ----- |
169 | 184 |
|
170 | 185 | ### Discovery Server Commands |
@@ -371,4 +386,4 @@ These commands are used to improve the performance of broadcast messages. |
371 | 386 |
|
372 | 387 | | `opcode` | Description | |
373 | 388 | | :--- | :--- | |
374 | | -| **`...`** | . . . | |
| 389 | +| **`...`** | . . . | |
0 commit comments