piermesh/docs/Packets/HeaderPacket.md

67 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

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-08-01 01:00:46 +00:00
### *class* Packets.HeaderPacket.Header(packetsID: int, packetCount: int, sender: int, senderDisplayName: int, recipient: int, recipientNode: int, subpacket: bool = False, wantFullResponse: bool = False, packetsClass: int = 0, pAction: int = -1)
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
3 digit (maximum) pAction ID for mapping precise actions within a protocol (TODO)
* **Type:**
int
#### dump()
Dump packet to msgpack encoded binary for transmission
#### usePreset(path: str)
Add preset fields to the packet