Optionaloptions: MessageChunkerOptionsStatic ReadonlydefaultStaticdefaultStatic Readonlymaxthe largest encode buffer kept from one message to the next
Static Readonlyminimumfloor for the growable encode buffer, so tiny messages do not keep reallocating
writes message as one or more chunks, handed to messageChunkCallback in order, then
null; returns a bad StatusCode, without calling back, when the message cannot be sent
(too large for the negotiated limits, or security options the chunker cannot apply).
A signature produced asynchronously needs chunkSecureMessageAsync.
chunkSecureMessage for an asynchronous signature (the OPN signature produced by a
remote HSM/KMS provider): the chunks are delivered to the callback, in order, once all are
signed, and the returned promise settles after the final null callback. A provider failure
rejects and delivers nothing. Messages chunked while it waits are delivered after it, in order.
The largest message body the chunker accepts with these parameters, or 0 when neither limit applies: the negotiated maxMessageSize, and maxChunkCount times what one chunk carries under the channel's security. The second is the tighter one whenever a peer derives its chunk count as maxMessageSize / bufferSize, as the CTT does, because every chunk also spends bytes on headers.
a SecureMessageChunkManager for a message of messageLength bytes, sharing this chunker's
sequence numbers, after the maxChunkCount and maxMessageSize checks.
Deprecated: the chunker writes every message with a SecureChunkWriter, which produces the same bytes. Kept for code that drives the chunk managers itself; to be removed in the next major version.
the maxMessageSize of a chunker created without one