Expand description
PULL socket module of Pipeline pattern in ZMQ
Use the pull
function to instantiate a pull socket and use methods from
the Stream
/StreamExt
traits.
A pull socket must be paired with a push
socket.
Example
use async_zmq::{Result, StreamExt};
#[async_std::main]
async fn main() -> Result<()> {
let mut zmq = async_zmq::pull("tcp://127.0.0.1:5555")?.connect()?;
while let Some(msg) = zmq.next().await {
// Received message is a type of Result<MessageBuf>
let msg = msg?;
println!("{:?}", msg.iter());
}
Ok(())
}
Structs
- The async wrapper of ZMQ socket with PULL type
Functions
- Create a ZMQ socket with PULL type