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