NetstringDecodeStreamOptions
NetstringDecodeStreamOptions =
NetstringDecoderOptions&object
Defined in: packages/format-netstring/src/netstring/netstring-decoder.ts:127
Type Declaration
Section titled “Type Declaration”maxBufferSize?
Section titled “maxBufferSize?”
optionalmaxBufferSize?:number
Hard ceiling on undecoded retained bytes. Distinct from NetstringDecoderOptions.maxPayloadLength, which bounds one declared frame; this bounds how much a producer may hand over before any of it is decodable. Defaults to 1 MiB.
onProtocolError?
Section titled “onProtocolError?”
optionalonProtocolError?: (error) =>void
Invoked for a recoverable protocol violation. Decoding continues afterward
— the Streams Standard has no event for a transform stream to report an
error without closing, so this callback is the substitute for the
'error'-without-destroy() pattern a Node.js Transform would use.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void