Libp2p.RequestResponse.Framing (libp2p_elixir v0.9.0)

Simple length-delimited framing for request/response messages.

This is not Ethereum SSZ-snappy framing; callers can wrap with their own codec. We provide it as a default for integration tests and simple protocols.

Summary

Functions

decode_one(buf)

@spec decode_one(binary()) :: {binary(), binary()} | :more

encode(bin)

@spec encode(binary()) :: binary()