Package-level declarations
Types
A point-to-point, message-oriented duplex link between exactly two peers.
A transport-agnostic stream of inbound peer Connections — the "front door" of a hosted session. Unlike KtorServerLoom.nextLink(), which collapses each accepted session into a finished 2-peer us.tractat.kuilt.core.Seam, accept yields the raw Connection (a hub spoke) so a composer can bond many of them into one group view.
Raised through acceptPump's onFailure when a conn's handle does not finish within the timeout.
The one-shot identity preamble: the body of the first frame on a handshaking link.
The link ended before the remote sent any frame, so there was no hello to read.
The body does not open with the kuil magic: the remote is not a kuilt peer (or predates v1).
The body is well-formed but carries a zero-length PeerId.
A Hello body this build refuses, or a link that closed before sending one. Each subclass names what was wrong, so a version break or a foreign peer never reads as generic corruption.
idLen disagrees with the bytes after the header — short, or (v1 is strict) trailing bytes.
The id bytes are not valid UTF-8; they are refused rather than decoded with replacement characters.
The remote's hello claims this peer's own id — typically a peer that dialed its own advertised endpoint (#1488). Not a format error: the bytes were a valid hello.
The body ended before the header (magic, version, flags, idLen) was complete.
Hello.encode cannot represent this peer's own id as UTF-8 — it holds a lone surrogate. Not a format error: it is raised locally, before anything is sent.
The body declares a Hello version this build does not implement.
Admission policy for mesh links: decides, per link, whether a handshaked connection may join the mesh.
The per-link signal raised by Mesh.addLink when a handshaked link is rejected by the mesh's LinkAdmission policy. The offending connection is already closed and was never published.
A Seam over a fully-connected N-peer mesh of point-to-point Connections, with support for admitting links that arrive after construction.
Something the mesh's duplicate-link dedup did that a consumer's own logger should be able to see.
Properties
How long a deduplicated loser is drained before the seam gives up on the remote's goodbye (#2474).
Default depth of a peer's receiver ordering hold (#2474): how far the live link may run ahead of a drained link's tail before the seam gives up on ordering the two and releases early.
Functions
Persistent, concurrent, handshake-timed accept loop. Drains source forever; each accepted Connection is handled in its OWN child coroutine under handshakeTimeout, so one conn that connects but never completes its handshake can never starve later conns — the sequential while (isActive) { handle(source.accept()) } pattern wedges on such a conn; this replaces it.
A 2-peer Seam for transports that do NOT carry identity out of band. Sends a Hello preamble as the first frame, awaits the peer's preamble, then delegates to identified over the same single collection of Connection.incoming. Suspends until the peer's preamble arrives.
Build a hub-mesh Seam — the start-empty-and-grow topology (a host admitting joiners).
A byte-transparent 2-peer Seam over a Connection whose two identities are known. broadcast == sendTo(remoteId). Woven at construction; Torn on conn EOF/error or close. Concurrent sends are serialized through an internal channel + single writer so wire order matches call order.
Build a fully-connected N-peer mesh Seam from a set of raw point-to-point connections.
Build a symmetric peer-mesh Seam — the contract-conforming N-peer fabric.