Browse Source

Update payloads.md: reflect size limits of text messages

References:

* block size limit: https://github.com/meshcore-dev/MeshCore/blob/main/src/helpers/BaseChatMesh.h#L8
* enforcement of message being a 0-terminated string: https://github.com/meshcore-dev/MeshCore/blob/main/src/helpers/BaseChatMesh.cpp#L474
pull/2582/head
Marco Schuster 4 weeks ago
committed by GitHub
parent
commit
0244a5e7ac
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      docs/payloads.md

4
docs/payloads.md

@ -174,6 +174,8 @@ txt_type
| `0x01` | CLI command | the command text of the message |
| `0x02` | signed plain text message | first four bytes is sender pubkey prefix, followed by plain text message |
The message is supposed to be an UTF-8 encoded, zero terminated string.
# Anonymous request
| Field | Size (bytes) | Description |
@ -236,6 +238,8 @@ txt_type
The plaintext contained in the ciphertext matches the format described in [plain text message](#plain-text-message). Specifically, it consists of a four byte timestamp, a flags byte, and the message. The flags byte will generally be `0x00` because it is a "plain text message". The message will be of the form `<sender name>: <message body>` (eg., `user123: I'm on my way`).
The ciphertext is limited to 160 bytes (10 blocks of 128 bit / 16 bytes) of length.
# Group datagram
| Field | Size (bytes) | Description |

Loading…
Cancel
Save