pub fn stdio_to_chans(
    tx: chan::Sender<u8>,
    rx: chan::Receiver<u8>,
) -> (JoinHandle<()>, JoinHandle<()>) {
    // the writer thread MUST be spawned first, as it sets the raw term mode
    let (writer_handle, ctrl_c_exit) = spawn_writer_thread(rx);
    let reader_handle = spawn_reader_thread(tx, ctrl_c_exit);
    (reader_handle, writer_handle)
}
/// Put Stdin into raw mode, and connect Stdin/Stdout to the tx/rx channels.
Put Stdin into raw mode, and connect Stdin/Stdout to the tx/rx channels.
Put Stdin into raw mode and connect Stdin / Stdout to the tx / rx channels .
pub fn stdio_to_chans(
    tx: chan::Sender<u8>,
    rx: chan::Receiver<u8>,
) -> (JoinHandle<()>, JoinHandle<()>) {
    // the writer thread MUST be spawned first, as it sets the raw term mode
    let (writer_handle, ctrl_c_exit) = spawn_writer_thread(rx);
    let reader_handle = spawn_reader_thread(tx, ctrl_c_exit);
    (reader_handle, writer_handle)
}
pub fn stdio_to_chans ( tx : chan :: Sender < u8 > , rx : chan :: Receiver < u8 > , ) -> ( JoinHandle < ( ) > , JoinHandle < ( ) > ) { // the writer thread MUST be spawned first, as it sets the raw term mode let ( writer_handle , ctrl_c_exit ) = spawn_writer_thread ( rx ) ; let reader_handle = spawn_reader_thread ( tx , ctrl_c_exit ) ; ( reader_handle , writer_handle ) }
Put Stdin into raw mode, and connect Stdin/Stdout to the tx/rx channels.
Put Stdin into raw mode and connect Stdin / Stdout to the tx / rx channels .
tx
chan::Sender<u8>
rx
chan::Receiver<u8>
tx
chan::Sender<u8>
rx
chan::Receiver<u8>