FrameBufferOptions
Defined in: packages/protocol/src/frame-buffer.ts:27
Configuration options for FrameBuffer.
Properties
Section titled “Properties”maxPayloadSize?
Section titled “maxPayloadSize?”
optionalmaxPayloadSize:number
Defined in: packages/protocol/src/frame-buffer.ts:48
Maximum allowed payload size in bytes.
Defaults to DEFAULT_MAX_PAYLOAD_SIZE (1GB). Cannot exceed ABSOLUTE_MAX_PAYLOAD_SIZE (~2GB, Node.js limit).
Use cases:
- Lower limit for control messages: 1MB
- Default for data plane: 1GB
- Higher for large file transfers: up to 2GB
Example
Section titled “Example”// Strict limit for small messagesnew FrameBuffer({ maxPayloadSize: 1024 * 1024 }) // 1MB
// Allow large filesnew FrameBuffer({ maxPayloadSize: 2 * 1024 * 1024 * 1024 - 1 }) // ~2GB