pub fn spawn_channel_relay<F, G>(
channel_id: u32,
read_half: OwnedReadHalf,
write_half: OwnedWriteHalf,
on_data: F,
on_close: G,
) -> UnboundedSender<Bytes>Expand description
Spawn bidirectional relay tasks for a Unix stream channel.
Reader task reads from the stream and calls on_data/on_close.
Writer task drains the returned sender and writes to the stream.