UMIS SDK
    Preparing search index...

    Function createReassembler

    • Puts the chunks of a frame back together. push takes the chunks of one message in the order they were made and returns the frame with the last of them; until then it returns undefined. Anything that does not fit is MALFORMED and the unfinished message is dropped, so the next chunk starts afresh: a chunk that is not a header with data, an index that is not below the total, a first chunk that is not index 0, a chunk of another message, a changed total, an index seen twice or one that skips a chunk, and a message that grows beyond maxBytes (LIMITS.frameMaxBytes by default, which is also the most that can be asked for). The first chunk of a message with a new id replaces an unfinished message without an error, because a sender that gave up starts over with a new id. reset drops the unfinished message.

      Parameters

      • o: { maxBytes?: number } = {}

      Returns {
          push(chunk: Uint8Array): Uint8Array<ArrayBufferLike> | undefined;
          reset(): void;
      }