Adapt an arbitrary accept/connect transport (i.e. TCP) to be a Link provider - #5
Merged
Conversation
The design of record for rumors::link::routed: one connection per stream behind a per-process router, a token-routed connect header with a one-RTT establishment acknowledgement, generic over a caller-supplied Dial/Listen seam (opaque addresses, no IP binding). Records the decisions: in-crate module, per-link token, single-use connections, caller-driven router with count-bounded header reads, pooling deferred to the Dial seam (with the qorb evaluation), no discovery in v1.
rumors::link::routed adapts any accept/connect byte-stream transport (a caller-supplied Dial/Listen pair; addresses are opaque names in the caller's namespace, not IP) into a Link: one connection per stream, routed to its link by a token-bearing connect header, with a one-RTT establishment acknowledgement making token registration on both routers happen-before either end's first stream open. The router is a caller-driven future (the crate still spawns nothing and needs no runtime or clock): per-connection header reads run as concurrent futures bounded by count with oldest-first eviction, delivery into per-link queues is try_send-only, and a queue overflow evicts the whole link so misbehavior surfaces as transport failure instead of a silently lost stream. Dropping a link revokes its routing at that moment. Validated by the exported conformance suite over TCP (default and OS-floor buffers, both construction orientations) and over a string- named in-memory network, plus a three-endpoint mesh converging by concurrent gossip beside a connection stalled mid-header, and unit suites for the wire format and every router-discipline clause.
…aths Rename Token::mint() to Token::new(), and import the handful of names the new modules had been spelling out inline (Entry, HashMap, MutexGuard, TrySendError, IpAddr, fmt, split, duplex, select, try_join, Link, LinkInfo).
plaidfinch
marked this pull request as ready for review
July 29, 2026 15:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.