Skip to main content

Module request

Module request 

Source
Expand description

RNS 1.4.2 Link.request (context 0x09) and its answer (0x0A).

  • A request is msgpack [time, truncated_hash(path), data].
  • The response is msgpack [request_id, data]. data crosses as raw msgpack value bytes.

Payloads past the link MDU are Resource territory, refused here.

Structs§

ParsedRequest
RequestId
RNS 1.4.2 packet.getTruncatedHash(), naming the request in its response.
RespondDispatch
SendRequestDispatch

Enums§

LinkRequestWriteError
PackBinaryError
RequestPlaintextError
ResponsePlaintextError

Constants§

MAX_PACKED_BINARY_HEADER_LEN
REQUEST_RESPONSE_GRACE_MS
RNS 1.4.2 Resource.RESPONSE_MAX_GRACE_TIME (10 s) × 1.125, the flat term in a request’s default timeout: rtt × traffic_timeout_factor + 11.25 s.
REQUEST_WIRE_OVERHEAD
msgpack fixarray(3)float64 time ‖ bin8(16) path hash, before data.
RESPONSE_WIRE_OVERHEAD
msgpack fixarray(2)bin8(16) request id, before data.
WRAPPED_PLAINTEXT_CAP
Both verbs’ data caps derive from the single-packet link MDU, so the two sides land on the same figure by construction.

Functions§

packed_binary_header_len
packed_binary_len
parse_request_plaintext
Hostile floats saturate the way the LRRTT parse does; anything not shaped like the reference’s three-element pack is refused.
parse_response_plaintext
response_data_wire_len
umsgpack.packb([request_id, response]). An empty response body still rides as one msgpack nil byte.
response_envelope_prefix
write_packed_binary_header
write_request_plaintext
write_response_plaintext