Skip to main content

Module protocol

Module protocol 

Source

Structs§

SyncHeader
First line of every sync stream: HEADER_PREFIX, a space, then plaintext JSON, so a peer holding the wrong key still gets a version error. It carries no data, is not a change-log entry and has no sequence number.

Enums§

VersionError

Constants§

SYNC_PROTOCOL_VERSION
Bump whenever the sync wire format or the meaning of a field changes: the record envelope, the header line, the line framing or the crypto frame. wire_format_matches_the_protocol_version pins the current format. Releases up to second-brain 0.10.0 sent no header and count as protocol 1.

Functions§

read_header
Reads the header line that must open a sync stream, skipping blank lines. An empty stream is refused like a header-less one: a current sender always writes the header, even when it has no records.