Skip to main content

Module multipart

Module multipart 

Source
Expand description

Multi-part message engine.

§Spec: §5.10, Table 4

When a command or reply payload is larger than a single packet supports, the data block is prefixed with a 6-byte multi-part header:

+---------------+--------------+--------------------+
| MpSizeTotal   | MpOffset     | MpFragmentSize     |
| (u16 LE)      | (u16 LE)     | (u16 LE)           |
+---------------+--------------+--------------------+

Rules enforced by this module:

  • First fragment is always at offset 0.
  • Fragments are strictly sequential (no gaps, no reorder).
  • All fragments report the same MpSizeTotal.
  • Sender may abort by setting MpOffset >= MpSizeTotal and MpFragmentSize = 0.

Structs§

MultipartHeader
Multi-part header on the wire.
MultipartRx
Reassembler for incoming multi-part transfers.
MultipartTx
Iterator-style splitter for outgoing multi-part transfers.