Expand description
REP socket module of Request-reply pattern in ZMQ
Use the reply
function to instantiate a reply socket and use methods from
the Stream
/[StreamExt
] traits.
A reply socket must be paired with a request
or dealer
socket.
Example
use async_zmq::Result;
#[async_std::main]
async fn main() -> Result<()> {
let mut zmq = async_zmq::reply("tcp://127.0.0.1:5555")?.bind()?;
let msg = zmq.recv().await?;
zmq.send(vec!["broadcast message"]).await?;
Ok(())
}
Structs
- The async wrapper of ZMQ socket with REP type
Functions
- Create a ZMQ socket with REP type