package netchannel

  1. Overview
  2. Docs

Parameters

module F : FRAME_MSG

Signature

type fragment = {
  1. size : int;
    (*

    The size field in F.t is complicated (the first message contains the size of the whole frame, and any size may contain an error). This size field is instead simply the size of the fragment.

    *)
  2. msg : F.t;
}
type frame = {
  1. total_size : int;
  2. fragments : fragment list;
}
val group_frames : F.t list -> (frame, F.error * F.t list) Stdlib.result list

Convert a list of requests into a list of frames. If any fragment contains an error, then the whole frame is an error. The error value includes all the messages in the frame, so they can be released.

OCaml

Innovation. Community. Security.