Skip to main content

Module iltp

Module iltp 

Source
Expand description

ILTP byte codec and stream encodings.

The codec owns raw session prefaces and their offers, canonical item framing, partial bytes, hard framing caps, and EOF truncation. Below the item framing, the stream layer applies each direction’s 065 encoding, selected from the two prefaces of every logical session. Semantic authority, establishment, round, and control-family validation belong to core::SessionMachine.

Structs§

DecodeProgress
Bytes one StreamDecoder::decode call took from its input and wrote to its output.
EncodeProgress
Bytes one StreamEncoder::encode call took and wrote, and whether its step is complete: all input taken for Write, everything flushed or ended for Flush and End.
IltpCodec
Encodes accepted output batches and decodes peer bytes for one connected carrier. Prefaces pass raw; the two prefaces of each logical session select and install both directions’ 065 stream encodings.
PortText
What a preface’s sender wants to talk to: SEGMENT(/SEGMENT)*, each segment one or more printable ASCII bytes other than /, at most PORT_MAX_BYTES in total.
RecordRead
A read of buffer.len() canonical bytes of record at offset.
SessionNonceText
Canonical B64A text for one nonzero 32-byte logical-session nonce.
SessionPreface
One raw session preface: its sender’s nonce, stream-encoding offers, and optional port.
StreamDecoder
Decoder for one direction of one logical session.
StreamEncoder
Encoder for one direction of one logical session.
StreamOffers
The 065 offers one preface carries, restricted to encodings this build implements. identity ends both lists implicitly and is never listed.

Enums§

Decoded
One decoded event of peer input; see IltpCodec::decode.
EncodeMode
The step one StreamEncoder::encode call takes.
IltpError
Error returned by the ILTP codec.
IltpItem
One framing input or output from a Lace ILTP byte stream: a raw preface or a labelled item.
IltpTruncation
ListingForm
The base a listing item applies to (060/061), named by its label.
ListingRow
One listing row: a withdrawal or a complete added entry.
OutputBytes
The next bytes of accepted output; see IltpCodec::output_bytes.
RecordLabel
What a record item carries.
StreamEncoding
One direction’s stream encoding, named by its preface token.
StreamEncodingError

Constants§

CHANGE_LINE_BYTES
A + HASH or - HASH change line with its LF.
DEFAULT_CHUNK_BYTES
Bytes per transmitted or received chunk unless a runtime configures more.
EMPTY_LISTING_BYTES
The empty listing rendered as an ::offers item.
ENCODE_MIN_OUTPUT
Output room a flushing StreamEncoder::encode step needs: zlib repeats sync-flush markers when a flush ends with no room left.
ITEM_MAX_BYTES
Hard cap on one complete ILTP item.
MIN_CHUNK_BYTES
The smallest chunk a codec accepts.
OFFER_LINE_BYTES
A bare HASH offer line with its LF.
PORT_MAX_BYTES
The longest port: a Port field line at 010’s 128-byte bound.
RESPONSE_FRAMING_BYTES
The framing of one ::response item around its record: the label line and the LF after the record.
ROUND_END_BYTES
One ::round-end item.
SESSION_PREFACE_MAX_BYTES
Hard cap on one session preface, including its terminating empty line.
STREAM_ENCODING_DICTIONARY
Raw preset dictionary priming every fresh compressed encoder and decoder.

Functions§

canonical_item_size
Canonical encoded size of one item, without rendering or copying it. A control item beyond the item cap is ItemTooLarge.
entry_len
Bytes of one offer in an ::offers item: its hash line and one HT-prefixed line per field occurrence.