Expand description
The realtime wire, byte for byte as every Vector client speaks it: base32 topic ids, relay-only node addresses, and the gossip frame trailer.
Re-exports§
pub use crate::webxdc::base32_nopad_decode;pub use crate::webxdc::base32_nopad_encode;
Constants§
- MAX_
GOSSIP_ MESSAGE - What the gossip layer accepts per message: payload plus trailer, with headroom.
- MAX_
PAYLOAD - The largest payload an app may send in one frame (the WebXDC limit).
- NODE_
KEY_ LEN - TRAILER_
LEN - Every frame ends in a 4-byte little-endian sequence number and the sending node’s key. Gossip dedups by content hash, so the trailer is what keeps two peers’ identical payloads (two “hello“s) from collapsing into one.
Functions§
- browser_
relay - A relay as a browser can dial it. WebKit refuses a WebSocket to a fully qualified host, and iroh spells its relays with the trailing dot; without it the URL names the same server.
- decode_
node_ addr - A peer-supplied address, reduced to its relay paths: dialling a direct
address someone else nominated would hand them our IP. Which relays may be
dialled is the mesh’s call (
is_default_relay). - decode_
topic - A topic id as it rides the
webxdc-topictag: 52 base32 characters. - dialable
- A peer’s address as this platform may dial it: only relays every client uses (a peer-named relay would be a server of their choosing that we connect to), spelled as the platform can reach them. Empty when none is left.
- encode_
node_ addr - encode_
topic - fallback_
topic - The topic for an app whose message carries none: derived from the app’s name (as its manifest gives it) and the message, so every copy agrees.
- is_
default_ relay - Whether a relay is one of iroh’s defaults, the set every Vector client uses. Hosts compare without iroh’s trailing dot.
- open_
frame - Split an inbound frame into
(payload, sender node key).Nonefor a frame too short to carry a trailer. - relay_
mode - The relays a node uses: iroh’s defaults, as the platform can dial them.
- relay_
only - relay_
urls - seal_
frame - Append the trailer to an outbound payload.