Created
August 21, 2018 19:51
-
-
Save rust-play/6eec30d3d0da7e75a4d05e55d813f9ea to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let (tx, rx): (mpsc::SyncSender<Vec<i16>>, mpsc::Receiver<Vec<i16>>) = mpsc::sync_channel(10 as usize); | |
listen("127.0.0.1:8000",|out| { | |
move |msg| { | |
let d = rx.recv().expect("ERROR RECV"); | |
out.send("done") | |
} | |
}).unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment