mod async_helpers; use std::convert::TryInto; use zeromq::*; #[async_helpers::main] async fn main() -> Result<(), Box> { println!("Start server"); let mut socket = zeromq::RepSocket::new(); socket.bind("tcp://127.0.0.1:5555").await?; loop { let mut repl: String = socket.recv().await?.try_into()?; dbg!(&repl); repl.push_str(" Reply"); socket.send(repl.into()).await?; } }