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
|
|
|
|
|
|
|
|
#### 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
|