feat: rename ALPN prefix from alknet/ to alk/ (v0.1.1)
- CHANNELS_ALPN: b"alknet/channels" → b"alk/channels" - CallAdapter::alpn(): b"alknet/call" → b"alk/call" - derive_alpn_from_op_name: alknet/ prefix → alk/ prefix - All ALPN string literals in src/ and docs/ updated - ADR-004 amended with prefix rename rationale - AGENTS.md, README.md updated - Version bumped to 0.1.1 Review: docs/reviews/003-alpn-prefix-rename.md Verification: - cargo test: 542 passed, 0 failed - cargo clippy --all-targets -- -D warnings: clean - cargo fmt --check: clean - cargo doc --no-deps: clean
This commit is contained in:
1 parent
3cce1410c4
commit
08e7df2aa0
60 files changed
+837
-328
No files matched your search
@@ -5,7 +5,7 @@ last_updated: 2026-07-18
|
||||
|
||||
# channels-wire.md — The 8-Byte Chunk Format
|
||||
|
||||
The wire format for `alknet/channels`: an 8-byte chunk header that
|
||||
The wire format for `alk/channels`: an 8-byte chunk header that
|
||||
multiplexes N logical channels over a single ordered, reliable
|
||||
bidirectional transport stream. ADR-034 (amended by ADR-035) is the
|
||||
decision; this doc specifies the format and the wire-level invariants.
|
||||
@@ -23,7 +23,7 @@ multiplexing on the `BiStream` the channels layer gives it.
|
||||
|
||||
| field | offset | width | meaning |
|
||||
|-------|--------|-------|---------|
|
||||
| `channel_id` | 0 | 4 (BE) | The logical channel this chunk belongs to. Channel 0 is pre-negotiated as `alknet/call` (ADR-036). Channels 1..N are opened dynamically via `channel/open` (ADR-037). |
|
||||
| `channel_id` | 0 | 4 (BE) | The logical channel this chunk belongs to. Channel 0 is pre-negotiated as `alk/call` (ADR-036). Channels 1..N are opened dynamically via `channel/open` (ADR-037). |
|
||||
| `length` | 4 | 4 (BE) | The payload length in bytes. 0 = EOF sentinel. Max `MAX_CHUNK_LEN`. |
|
||||
|
||||
The payload is opaque to the channels layer. The handler parses its own
|
||||
@@ -70,10 +70,10 @@ stream — the demux drops the chunk and continues. The header is always
|
||||
exactly 8 bytes, so the demux can always resync by reading the next
|
||||
8-byte header.
|
||||
|
||||
## Channel 0 — pre-negotiated `alknet/call`
|
||||
## Channel 0 — pre-negotiated `alk/call`
|
||||
|
||||
Channel 0 is not a special "control plane" with its own framing. It is
|
||||
`alknet/call` pre-negotiated (ADR-036): both sides know `channel_id = 0`
|
||||
`alk/call` pre-negotiated (ADR-036): both sides know `channel_id = 0`
|
||||
is routed to the `CallAdapter` without an explicit `channel/open`
|
||||
exchange.
|
||||
|
||||
@@ -230,7 +230,7 @@ a `channel_id` was stripped before it saw the bytes.
|
||||
|
||||
The composition is uniform — the same shape at every level. This is SSH's
|
||||
model (layered headers, each layer strips its own at its boundary),
|
||||
applied to channels. A `alknet/channels`-inside-`alknet/channels`
|
||||
applied to channels. A `alk/channels`-inside-`alk/channels`
|
||||
recursive composition is the outer layer stripping its 8-byte header, the
|
||||
inner layer parsing its own 8-byte header from the payload — same code,
|
||||
same shape, each level.
|
||||
|
||||
Reference in new issue
Block a user