2024-08-01 22:03:59 +00:00
|
|
|
<a id="header-packet-metadata-packet"></a>
|
|
|
|
|
2024-07-28 11:21:15 +00:00
|
|
|
# Header packet: Metadata packet
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
### *class* Packets.HeaderPacket.Header(packetsID: int, packetCount: int, sender: int, senderDisplayName: int, sourceNode: int, recipient: int, recipientNode: int, wantFullResponse: bool = False, packetsClass: int = 0, pAction: int = -1, target=True)
|
2024-08-01 01:00:46 +00:00
|
|
|
|
|
|
|
Metadata packet for messages
|
|
|
|
|
2024-08-01 22:03:59 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Packets/HeaderPacket.py)
|
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
#### sender
|
|
|
|
|
|
|
|
6 digit (maximum) node or peer ID
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### senderDisplayName
|
|
|
|
|
|
|
|
3 digit (maximum) ID for mapping display names to a given user
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### recipient
|
|
|
|
|
|
|
|
6 digit (maximum) node or peer ID
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### recipientNode
|
|
|
|
|
|
|
|
6 digit (maximum) node ID to route the packet to
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### subpacket
|
|
|
|
|
|
|
|
Whether this is a subpacket
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
bool
|
|
|
|
|
|
|
|
#### wantFullResponse
|
|
|
|
|
|
|
|
Whether a response should be sent when the message completes reception (TODO)
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
bool
|
|
|
|
|
|
|
|
#### pAction
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
3 digit (maximum) pAction ID for mapping precise actions within a protocol
|
2024-08-01 01:00:46 +00:00
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### dump()
|
|
|
|
|
|
|
|
Dump packet to msgpack encoded binary for transmission
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
#### usePreset(path: str, daisyCryptography)
|
2024-08-01 01:00:46 +00:00
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
Add preset fields to the packet, currently unused
|