Expand description
In-process pipes to another native app (core.pipe.*, ADR-300).
In-process pipes to another native app (core.pipe.*, ADR-300).
Two native apps in one host process can share a live two-way byte stream: the opener gets
one end of a host-made AF_UNIX socket pair and a token for the other; it passes the token
on in a capability call of its own; the receiver claims it. Each side then owns a plain Unix
stream socket and wraps it on its own runtime (tokio::net::UnixStream::from_std after
set_nonblocking(true)). A token nobody claims within its TTL closes, and the opener reads
EOF.
ⓘ
// opener
let (ours, token) = node_app_sdk_rust::pipe::open("ln-bolt8", None)?;
invoke_capability(/* the other app's capability, carrying `token` */)?;
// receiver, inside that capability
let (theirs, _info) = node_app_sdk_rust::pipe::claim(&token)?;Structs§
- Claim
Info - What the claimer learns about the pipe.