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
@@ -30,7 +30,7 @@ The channels crate has two internal components, split by responsibility
|
||||
Connection Internals):
|
||||
|
||||
1. **`ChannelsAdapter`** — implements `ProtocolHandler` for
|
||||
`alknet/channels`. Its `handle()` receives one `Connection` (the
|
||||
`alk/channels`. Its `handle()` receives one `Connection` (the
|
||||
transport), reads 9-byte chunk headers, and routes each chunk. It is the
|
||||
read/demux half.
|
||||
|
||||
@@ -53,12 +53,12 @@ contracts.
|
||||
```rust
|
||||
#[async_trait]
|
||||
impl ProtocolHandler for ChannelsAdapter {
|
||||
fn alpn(&self) -> &'static [u8] { b"alknet/channels" }
|
||||
fn alpn(&self) -> &'static [u8] { b"alk/channels" }
|
||||
|
||||
async fn handle(&self, connection: Connection, auth: &AuthContext)
|
||||
-> Result<(), HandlerError>
|
||||
{
|
||||
// 1. Channel 0 is pre-negotiated as alknet/call (ADR-036).
|
||||
// 1. Channel 0 is pre-negotiated as alk/call (ADR-036).
|
||||
// The first bidi stream the transport yields is channel 0.
|
||||
let (send, recv) = connection.accept_bi().await?;
|
||||
self.manager.preinstall_channel_0(send, recv, auth).await?;
|
||||
@@ -79,7 +79,7 @@ The `preinstall_channel_0` step constructs the reassembly buffers for
|
||||
`channel_id = 0` using stream_types [0, 1] (ADR-036), wraps them as a
|
||||
`Connection` (via `Connection::from_source` with a `ChannelBidiStreamSource`
|
||||
— ADR-038), and hands that `Connection` to the `CallAdapter` — exactly as if
|
||||
`alknet/call` had been the top-level ALPN. The `CallAdapter` is looked up in
|
||||
`alk/call` had been the top-level ALPN. The `CallAdapter` is looked up in
|
||||
the same `HandlerRegistry` as every other ALPN.
|
||||
|
||||
`run_demux_loop` continues accepting bidi streams from the transport. For
|
||||
|
||||
Reference in new issue
Block a user