MCPcopy Create free account
hub / github.com/ElementsProject/lightning / from_stream

Method from_stream

cln-rpc/src/lib.rs:134–142  ·  view source on GitHub ↗
(stream: UnixStream)

Source from the content-addressed store, hash-verified

132 }
133
134 fn from_stream(stream: UnixStream) -> Result<ClnRpc> {
135 let (read, write) = stream.into_split();
136
137 Ok(ClnRpc {
138 next_id: AtomicUsize::new(1),
139 read: FramedRead::new(read, JsonCodec::default()),
140 write: FramedWrite::new(write, JsonCodec::default()),
141 })
142 }
143
144 /// Low-level API to call the rpc.
145 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected