Module async_zmq::push

source ·
Expand description

PUSH socket module of Pipeline pattern in ZMQ

Use the push function to instantiate a push socket and use methods from the Sink/SinkExt traits.

A push socket must be paired with a pull socket.

Example

use async_zmq::{Result, SinkExt};

#[async_std::main]
async fn main() -> Result<()> {
    let mut zmq = async_zmq::push("tcp://127.0.0.1:5555")?.bind()?;

    zmq.send(vec!["topic", "broadcast message"].into()).await?;
    Ok(())
}

Structs

  • The async wrapper of ZMQ socket with PUSH type

Functions

  • Create a ZMQ socket with PUSH type