feat(call): implement CallConnection with imported-ops overlay (Layer 2) and call/subscribe/abort methods
Implements CallConnection in src/protocol/connection.rs representing an established alknet/call connection (either direction). Holds the Layer 2 imported-ops overlay (ADR-024) as Arc<RwLock<HashMap>>. - register_imported / register_imported_all add to the connection overlay - overlay_env returns an OperationEnv dispatching to imported ops; contains() returns true only for ops in the overlay - call() opens a stream, sends call.requested, registers in PendingRequestMap, spawns a stream reader, resolves on first call.responded - subscribe() sends call.requested and yields call.responded until call.completed/call.aborted via a SubscriptionStream wrapping the mpsc receiver - abort() sends call.aborted for the request ID and removes the pending entry - connection drop drops the overlay (no explicit deregistration needed) Exposes MockConnection trait and Connection::from_mock in alknet-core so cross-crate tests can construct mock connections without real QUIC. Removes two unused test helpers in env.rs that triggered dead-code warnings under -D warnings. Adds parking_lot dep for the overlay RwLock and pending Mutex. 9 new connection tests (102 total in alknet-call). Clippy clean.
This commit is contained in:
@@ -22,4 +22,5 @@ async-trait = "0.1"
|
||||
tracing = "0.1"
|
||||
thiserror = "2"
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
futures = "0.3"
|
||||
futures = "0.3"
|
||||
parking_lot = "0.12"
|
||||
Reference in New Issue
Block a user