Skip to content

Message Structure

Eric Voskuil edited this page Mar 15, 2017 · 14 revisions

Libbitcoin messages conform to a uniform message structure implemented using ZeroMQ. ZeroMQ imposes its own structure on messages, described at a high level below.

Frame

The fundamental unit of a message is a frame. A frame is a length-specified block of data.

[----frame-----]

Message

A message is a set of frames that make up an envelope and body.

[---envelope---]
[-----body-----]

Envelope

An envelope may contain addressing frames and an empty frame (delimiter) prior to the body.

[----route-----]
[--------------]
[-----body-----]

Libbitcoin Message

A libbitcoin message is a ZeroMQ message with a command frame and a payload frame.

[----route----]
[-------------]
[---command---]
[---payload---]

The full set of commands and corresponding payloads makes up the libbitcoin client-server interface.

Clone this wiki locally