Hcs.Grpc.Message

hcs · API reference

The gRPC length-prefix framing: each message is a 1-byte compressed-flag, a 4-byte big-endian length, then the payload. Compression is not supported (the flag is always written as 0).

val frame : string -> string

frame msg wraps msg in a single length-prefixed frame (uncompressed).

val decode_all : string -> string list

decode_all buf splits a buffer of zero or more complete frames into their payloads.

raises Invalid_argument if buf ends mid-frame.