Skip to Content
Welcome to the Spectrum Documentation

ConstaNetMultiPart

ConstaNetMultiPart.gd 
Extends: ConstaNetHeadder

Copyright (c) 2025
Liam Sherwin — All rights reserved.
Licensed under GPLv3

ConstaNetMultiPart is the packet type used to transport large payloads split across multiple chunks.
All chunks that belong to the same logical message share a common multipart identifier and are reassembled by the receiver.


Member Variables

multi_part_id

DataType: String
Default: ""
Identifier for this multipart message.
All chunks belonging to the same logical payload use the same multi_part_id.


num_of_chunks

DataType: int
Default: 0
Total number of chunks that make up this multipart message.
Receivers can use this to determine when they have received the complete set of chunks.


chunk_id

DataType: int
Default: 0
Identifier for this specific chunk within the multipart sequence.


data

DataType: PackedByteArray
Default: []
Raw binary data for this chunk.
Used together with multi_part_id, num_of_chunks, and chunk_id to reconstruct the complete payload on the receiving side.


Packet Structure

Offsets below refer to the payload portion (after the base header defined in ConstaNetHeadder).
See DataTypes.

OffsetTypeField
0NodeIDMultipart ID
36uint16Number of chunks
38uint16Chunk ID
40uint32Data byte length
44uint8[]Chunk data

Where:

  • Multipart ID is a 36-byte ASCII identifier, encoded in the same format as NodeID.
  • Data byte length is a 4-byte little-endian integer specifying the size of the following chunk data.
  • Chunk data contains the raw bytes for this portion of the multipart message.
Last updated on