Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Function readFrames

    • Yields the frames of a pack as their bytes arrive, so a reader can verify and keep each block before the next one lands. Throws bad-bundle for a frame that is cut short, has a bad header, or declares a payload over maxFrameBytes; that check runs before the payload is read.

      Parameters

      • source: AsyncIterable<Bytes>
      • maxFrameBytes: number = MAX_BUNDLE_FRAME_BYTES

      Returns AsyncGenerator<BundleFrame>